Invalidate the cache when failing to load the app context #5511 #21
Workflow file for this run
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: Authgear Once | |
| on: | |
| push: | |
| tags: | |
| - 'authgear-once/*' | |
| jobs: | |
| once-image-amd64: | |
| if: ${{ github.repository == 'authgear/authgear-server' }} | |
| runs-on: ubuntu-24.04 | |
| outputs: | |
| image_digest: ${{ steps.build_image.outputs.image_digest }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - id: build_image | |
| uses: ./.github/actions/build-image | |
| with: | |
| dockerfile: ./once/Dockerfile | |
| image_name: quay.io/theauthgear/authgear-once | |
| push_image: 'true' | |
| build_arch: amd64 | |
| docker_registry: quay.io | |
| docker_username: "${{ secrets.QUAY_USERNAME }}" | |
| docker_password: "${{ secrets.QUAY_ROBOT_TOKEN }}" | |
| once-image-arm64: | |
| if: ${{ github.repository == 'authgear/authgear-server' }} | |
| runs-on: ubuntu-24.04-arm | |
| outputs: | |
| image_digest: ${{ steps.build_image.outputs.image_digest }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - id: build_image | |
| uses: ./.github/actions/build-image | |
| with: | |
| dockerfile: ./once/Dockerfile | |
| image_name: quay.io/theauthgear/authgear-once | |
| push_image: 'true' | |
| build_arch: arm64 | |
| docker_registry: quay.io | |
| docker_username: "${{ secrets.QUAY_USERNAME }}" | |
| docker_password: "${{ secrets.QUAY_ROBOT_TOKEN }}" | |
| once-image: | |
| if: ${{ github.repository == 'authgear/authgear-server' }} | |
| runs-on: ubuntu-24.04 | |
| needs: ["once-image-amd64", "once-image-arm64"] | |
| env: | |
| IMAGE_NAME: quay.io/theauthgear/authgear-once | |
| SOURCE_DIGESTS: ${{ format('{0} {1}', needs.once-image-amd64.outputs.image_digest, needs.once-image-arm64.outputs.image_digest) }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set GIT_TAG_NAME | |
| env: | |
| GITHUB_REF_TYPE: ${{ github.ref_type }} | |
| GITHUB_REF_NAME: ${{ github.ref_name }} | |
| run: | | |
| set -ex | |
| make authgearonce-set-git-tag-name >> "$GITHUB_ENV" | |
| tail -n 1 "$GITHUB_ENV" | |
| - name: docker login | |
| env: | |
| DOCKER_USERNAME: ${{ secrets.QUAY_USERNAME }} | |
| DOCKER_PASSWORD: ${{ secrets.QUAY_ROBOT_TOKEN }} | |
| run: | | |
| printf "$DOCKER_PASSWORD" | docker login --password-stdin --username "$DOCKER_USERNAME" quay.io | |
| - run: make tag-image | |
| - name: docker logout | |
| if: ${{ always() }} | |
| run: | | |
| docker logout quay.io | |
| once-command-darwin-arm64: | |
| runs-on: macos-14 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-go@v4 | |
| with: | |
| go-version-file: "./go.mod" | |
| - name: Show the version of bundled make | |
| run: make --version | |
| - name: Install a much recent make from Homebrew | |
| run: | | |
| brew update | |
| brew install make | |
| - name: Show the version of gmake | |
| run: gmake --version | |
| - name: Set AUTHGEARONCE_LICENSE_SERVER_ENV by tag name | |
| env: | |
| GITHUB_REF_TYPE: ${{ github.ref_type }} | |
| GITHUB_REF_NAME: ${{ github.ref_name }} | |
| run: | | |
| set -ex | |
| gmake authgearonce-set-AUTHGEARONCE_LICENSE_SERVER_ENV-by-tag-name >> "$GITHUB_ENV" | |
| tail -n 1 "$GITHUB_ENV" | |
| - run: gmake authgearonce-binary | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: authgear-once-darwin-arm64 | |
| if-no-files-found: error | |
| retention-days: 1 | |
| path: | | |
| ./dist/* | |
| once-command-linux-amd64: | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-go@v4 | |
| with: | |
| go-version-file: "./go.mod" | |
| - name: Set AUTHGEARONCE_LICENSE_SERVER_ENV by tag name | |
| env: | |
| GITHUB_REF_TYPE: ${{ github.ref_type }} | |
| GITHUB_REF_NAME: ${{ github.ref_name }} | |
| run: | | |
| set -ex | |
| make authgearonce-set-AUTHGEARONCE_LICENSE_SERVER_ENV-by-tag-name >> "$GITHUB_ENV" | |
| tail -n 1 "$GITHUB_ENV" | |
| - run: make authgearonce-binary | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: authgear-once-linux-amd64 | |
| if-no-files-found: error | |
| retention-days: 1 | |
| path: | | |
| ./dist/* | |
| once-command-linux-arm64: | |
| runs-on: ubuntu-24.04-arm | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-go@v4 | |
| with: | |
| go-version-file: "./go.mod" | |
| - name: Set AUTHGEARONCE_LICENSE_SERVER_ENV by tag name | |
| env: | |
| GITHUB_REF_TYPE: ${{ github.ref_type }} | |
| GITHUB_REF_NAME: ${{ github.ref_name }} | |
| run: | | |
| set -ex | |
| make authgearonce-set-AUTHGEARONCE_LICENSE_SERVER_ENV-by-tag-name >> "$GITHUB_ENV" | |
| tail -n 1 "$GITHUB_ENV" | |
| - run: make authgearonce-binary | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: authgear-once-linux-arm64 | |
| if-no-files-found: error | |
| retention-days: 1 | |
| path: | | |
| ./dist/* | |
| once-command-release: | |
| runs-on: ubuntu-24.04 | |
| needs: | |
| - once-command-darwin-arm64 | |
| - once-command-linux-amd64 | |
| - once-command-linux-arm64 | |
| steps: | |
| - uses: actions/download-artifact@v4 | |
| with: | |
| pattern: authgear-once-* | |
| merge-multiple: true | |
| - run: ls -alh | |
| - uses: oursky/action-gh-release@v2 | |
| with: | |
| draft: true | |
| files: | | |
| ./authgear-once-* |