🇧🇩 Exposures (Git) #377
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: 🇧🇩 Exposures (Git) | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: "45 02 * * *" #( 02:45 AM UTC --> 08:30 AM Morning ) | |
#------------------------------------------------------------------------------------# | |
env: | |
#$BOT_ID:$BOT_TOKEN/$CHAT_ID | |
#bot$BOT_ID has the bot prefixed : curl "https://api.telegram.org/bot$BOT_ID:$BOT_TOKEN/$CHAT_ID" | |
LOONIX_TG_BOT: "${{ secrets.BAD_BOT_TOKEN }}" | |
#Topic == Copy topic link | |
LOONIX_TOPIC_ID: "2949" | |
#------------------------------------------------------------------------------------# | |
jobs: | |
Initialize: | |
runs-on: ubuntu-latest | |
timeout-minutes: 300 | |
permissions: | |
contents: write | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
with: | |
path: main | |
- name: Install Coreutils | |
run: | | |
# Presets | |
set -x ; set +e | |
#--------------# | |
sudo apt update -y | |
sudo apt install coreutils curl dos2unix jq moreutils wget -y | |
# Do again, sometimes fails | |
sudo apt install coreutils curl dos2unix jq moreutils wget -y | |
continue-on-error: true | |
- name: Run | |
run: | | |
# Presets | |
set +x ; set +e | |
#--------------# | |
# Download | |
# Dos2unix | |
dos2unix "$GITHUB_WORKSPACE/main/.github/scripts/git_exposures.sh" | |
# chmod +xwr | |
sudo chmod +xwr "$GITHUB_WORKSPACE/main/.github/scripts/git_exposures.sh" | |
# Run | |
# Always run with STD_OUT + STD_IN >/dev/null | |
bash "$GITHUB_WORKSPACE/main/.github/scripts/git_exposures.sh" >/dev/null 2>&1 | |
continue-on-error: true |