Autoupdate #204
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: Autoupdate | |
| on: | |
| workflow_dispatch: | |
| schedule: | |
| - cron: '0 13 * * *' | |
| permissions: | |
| contents: write | |
| pull-requests: write | |
| id-token: write | |
| jobs: | |
| autoupdate: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0 | |
| - name: Set up git user | |
| run: | | |
| git config --global user.email "github-actions[bot]@users.noreply.github.com" | |
| git config --global user.name "github-actions[bot]" | |
| - name: Get secrets out of vault | |
| uses: rancher-eio/read-vault-secrets@main | |
| with: | |
| secrets: | | |
| secret/data/github/repo/${{ github.repository }}/github/pr-actions-write-app/credentials appId | APP_ID; | |
| secret/data/github/repo/${{ github.repository }}/github/pr-actions-write-app/credentials privateKey | PRIVATE_KEY | |
| - name: Generate short-lived installation access token from app | |
| uses: actions/create-github-app-token@v1 | |
| id: app-token | |
| with: | |
| app-id: ${{ env.APP_ID }} | |
| private-key: ${{ env.PRIVATE_KEY }} | |
| - uses: actions/setup-go@44694675825211faa026b3c33043df3e48a5fa00 # v6 | |
| with: | |
| go-version: '1.24' | |
| cache-dependency-path: tools/go.sum | |
| - name: Build tooling | |
| run: scripts/build-tools.sh | |
| - name: Run autoupdate | |
| run: bin/artifact-mirror-tools autoupdate | |
| env: | |
| GITHUB_TOKEN: ${{ steps.app-token.outputs.token }} |