name: Check for updates on: schedule: # https://crontab.guru/every-day-8am - cron: 0 8 * * * workflow_dispatch: jobs: pull-request: # https://github.com/actions/virtual-environments runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - name: Run update check run: echo "version=$(bash check-updates.sh --version-only)" >> $GITHUB_ENV #run: echo "::set-output name=STATUS::$(bash check-updates.sh --version-only)" #id: update - name: Update version number run: | sed "s/PREV_RELEASE=.*/PREV_RELEASE=\"$(echo \"${{env.version}}\" | \ awk '{print $1}')\"/" \ check-updates.sh - name: Open pull request # https://docs.github.com/en/actions/learn-github-actions/expressions if: contains(env.update_status, '==') #if: contains(steps.update.outputs.STATUS, '==') uses: repo-sync/pull-request@v2 with: destination_branch: "master" github_token: ${{ secrets.GITHUB_TOKEN }} pr_allow_empty: true pr_title: "Add new release" pr_body: "A new release of Packet Tracer has been detected."