running around #173
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: running around | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: "24 20 21 04 *" | |
jobs: | |
run-script: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
with: | |
token: ${{ secrets.PAT_WITH_WORKFLOW_SCOPE }} | |
- name: Make script executable | |
run: chmod +x main.sh | |
- name: Run Bash script | |
id: script-output | |
run: | | |
output=$(./main.sh "${{ secrets.BOT_TOKEN }}" "inputJson.json" "chore(clone): update links") | |
echo "CRON=$output" >> $GITHUB_OUTPUT | |
- name: Set cron schedule | |
run: | | |
sed -i '0,/cron: ".*"/s/cron: ".*"/cron: "${{ steps.script-output.outputs.CRON }}"/' .github/workflows/runner.yml | |
- name: Commit inputFile | |
uses: EndBug/add-and-commit@v9 | |
with: | |
add: 'inputJson.json' | |
message: 'this should never commit anything' | |
push: true | |
- name: Commit workflow | |
uses: EndBug/add-and-commit@v9 | |
with: | |
add: '.github/workflows/runner.yml' | |
message: 'set new runtime' | |
push: true |