Automated update of main by @grvn #24
This file contains hidden or 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: update | |
| run-name: "Automated update of ${{ github.ref_name }} by @${{ github.actor }}" | |
| on: | |
| schedule: | |
| - cron: '0 4 * * *' | |
| workflow_dispatch: | |
| jobs: | |
| update-version: | |
| runs-on: ubuntu-latest | |
| if: ${{ github.ref == 'refs/heads/main' }} | |
| env: | |
| GH_TOKEN: ${{ github.token }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| persist-credentials: false | |
| fetch-depth: 0 | |
| token: ${{ secrets.PULL_PUSH }} | |
| - run: sudo apt update -y && sudo apt install -y jq git curl | |
| - run: bash ./srcpkgs/brave-browser/update-brave.sh | |
| # - run: bash ./srcpkgs/ly/update-ly.sh | |
| - run: bash ./srcpkgs/openshift-oc/update-oc.sh | |
| - run: bash ./srcpkgs/rebos/update-rebos.sh | |
| - run: bash ./srcpkgs/zen-browser/update-zen.sh | |
| - name: Check for updates | |
| id: check-updates | |
| run: | | |
| if [[ -n "$(git diff --exit-code)" ]]; then | |
| echo "has_updates=true" >> "$GITHUB_OUTPUT" | |
| else | |
| echo "No new updates" | |
| echo "has_updates=false" >> "$GITHUB_OUTPUT" | |
| fi | |
| - name: Commit updates | |
| if: ${{ steps.check-updates.outputs.has_updates == 'true' }} | |
| run: | | |
| git config --global user.name "github-actions[bot]" | |
| git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com" | |
| git commit --all --message "Automated update" | |
| - name: Push updates | |
| if: ${{ steps.check-updates.outputs.has_updates == 'true' }} | |
| uses: ad-m/github-push-action@master | |
| with: | |
| github_token: ${{ secrets.PULL_PUSH }} | |
| branch: ${{ github.ref }} |