Update patch #24292
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 patch | |
| on: | |
| push: | |
| workflow_dispatch: | |
| schedule: | |
| - cron: "40 * * * *" | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Login to GitHub Container Registry | |
| uses: docker/login-action@v2 | |
| with: | |
| registry: ghcr.io | |
| username: "azexbot" | |
| password: ${{ secrets.GHCR_TOKEN }} | |
| - name: Load cache | |
| uses: actions/cache@v3 | |
| with: | |
| key: azex-dbcache-${{ github.run_id }} | |
| path: "cache" | |
| restore-keys: | | |
| azex-dbcache | |
| - name: Checkout target repo | |
| uses: actions/checkout@v3 | |
| with: | |
| path: output/uncensor | |
| - name: Generate uncensor data | |
| env: | |
| IMAGE_NAME: ghcr.io/azurlanetools/azex/azex-uncensor | |
| run: > | |
| docker run --rm --name azex-uncensor | |
| -e AZEX_USER=$(id -u):$(id -g) | |
| -v $PWD:/azex | |
| $IMAGE_NAME | |
| python -m azex uncensor | |
| - name: Update badges | |
| uses: s0/git-publish-subdir-action@v2.6.0 | |
| env: | |
| REPO: self | |
| BRANCH: badges | |
| FOLDER: output/uncensor/badges | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| COMMIT_NAME: bot | |
| COMMIT_EMAIL: bot@github.com | |
| MESSAGE: update badges | |
| - name: Save changes | |
| id: status | |
| run: | | |
| # push | |
| cd output/uncensor | |
| cat release/outputs.txt >> "$GITHUB_OUTPUT" | |
| git push | |
| echo commit_id=$(git rev-parse HEAD) >> "$GITHUB_OUTPUT" | |
| - name: Release | |
| uses: softprops/action-gh-release@v1 | |
| if: ${{ steps.status.outputs.release != '' }} | |
| with: | |
| tag_name: ${{ steps.status.outputs.release }} | |
| body_path: output/uncensor/release/info.md | |
| target_commitish: ${{ steps.status.outputs.commit_id }} | |
| files: | | |
| output/uncensor/release/gametip | |
| output/uncensor/data/info.json |