Update github.com/nyaruka/phonenumbers #5498 #1405
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: Custom Build in oursky/authgear-server | |
| on: | |
| push: | |
| branches: | |
| - '*' | |
| - '!HEAD' | |
| - '!gh-pages' | |
| - '!ui-review*' | |
| tags: | |
| - '*' | |
| - '!authgear-once/*' | |
| jobs: | |
| authgear-image-custom: | |
| if: ${{ github.repository == 'oursky/authgear-server' }} | |
| runs-on: [self-hosted, linux, x64, v1] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: ./.github/actions/set-git-tag-name | |
| with: | |
| github_ref_type: ${{ github.ref_type }} | |
| github_ref_name: ${{ github.ref_name }} | |
| # https://aran.dev/posts/github-actions-go-private-modules/ | |
| - name: Set up SSH key | |
| env: | |
| SSH_AUTH_SOCK: /tmp/ssh_agent.sock | |
| AUTHGEAR_PRIVATE_DEPLOY_KEY: ${{ secrets.AUTHGEAR_PRIVATE_DEPLOY_KEY }} | |
| run: | | |
| mkdir -p ~/.ssh | |
| eval $(ssh-agent -a $SSH_AUTH_SOCK) | |
| printf "$AUTHGEAR_PRIVATE_DEPLOY_KEY" | base64 --decode | ssh-add - | |
| echo "SSH_AUTH_SOCK=$SSH_AUTH_SOCK" >> "$GITHUB_ENV" | |
| echo "SSH_AGENT_PID=$SSH_AGENT_PID" >> "$GITHUB_ENV" | |
| - uses: ./.github/actions/docker-buildx-create | |
| - name: Build and Push | |
| env: | |
| DOCKERFILE: ./cmd/authgearx/Dockerfile | |
| BUILD_ARCH: amd64 | |
| IMAGE_NAME: ${{ format('{0}/authgear-server', secrets.AUTHGEAR_CUSTOM_BUILD_REPO_PREFIX) }} | |
| OUTPUT: ${{ format('type=image,name={0}/authgear-server,push-by-digest=true,name-canonical=true,push=true', secrets.AUTHGEAR_CUSTOM_BUILD_REPO_PREFIX) }} | |
| EXTRA_BUILD_OPTS: '--ssh=default' | |
| run: | | |
| export METADATA_FILE="$(mktemp).json" | |
| echo "METADATA_FILE=$METADATA_FILE" | |
| make -C custombuild build-image | |
| (set -x && cat "$METADATA_FILE") | |
| export SOURCE_DIGESTS="$(jq < "$METADATA_FILE" '.["containerimage.digest"]' -r)" | |
| make -C custombuild tag-image | |
| - name: Clean up SSH key | |
| if: ${{ always() }} | |
| run: | | |
| ssh-add -D | |
| ssh-agent -k | |
| echo "SSH_AUTH_SOCK=" >> "$GITHUB_ENV" | |
| echo "SSH_AGENT_PID=" >> "$GITHUB_ENV" | |
| portal-image-custom: | |
| if: ${{ github.repository == 'oursky/authgear-server' }} | |
| runs-on: [self-hosted, linux, x64, v1] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: ./.github/actions/set-git-tag-name | |
| with: | |
| github_ref_type: ${{ github.ref_type }} | |
| github_ref_name: ${{ github.ref_name }} | |
| # https://aran.dev/posts/github-actions-go-private-modules/ | |
| - name: Set up SSH key | |
| env: | |
| SSH_AUTH_SOCK: /tmp/ssh_agent.sock | |
| AUTHGEAR_PRIVATE_DEPLOY_KEY: ${{ secrets.AUTHGEAR_PRIVATE_DEPLOY_KEY }} | |
| run: | | |
| mkdir -p ~/.ssh | |
| eval $(ssh-agent -a $SSH_AUTH_SOCK) | |
| printf "$AUTHGEAR_PRIVATE_DEPLOY_KEY" | base64 --decode | ssh-add - | |
| echo "SSH_AUTH_SOCK=$SSH_AUTH_SOCK" >> "$GITHUB_ENV" | |
| echo "SSH_AGENT_PID=$SSH_AGENT_PID" >> "$GITHUB_ENV" | |
| - uses: ./.github/actions/docker-buildx-create | |
| - name: Build and Push | |
| env: | |
| DOCKERFILE: ./cmd/portalx/Dockerfile | |
| BUILD_ARCH: amd64 | |
| IMAGE_NAME: ${{ format('{0}/authgear-portal', secrets.AUTHGEAR_CUSTOM_BUILD_REPO_PREFIX) }} | |
| OUTPUT: ${{ format('type=image,name={0}/authgear-portal,push-by-digest=true,name-canonical=true,push=true', secrets.AUTHGEAR_CUSTOM_BUILD_REPO_PREFIX) }} | |
| EXTRA_BUILD_OPTS: '--ssh=default' | |
| run: | | |
| export METADATA_FILE="$(mktemp).json" | |
| echo "METADATA_FILE=$METADATA_FILE" | |
| make -C custombuild build-image | |
| (set -x && cat "$METADATA_FILE") | |
| export SOURCE_DIGESTS="$(jq < "$METADATA_FILE" '.["containerimage.digest"]' -r)" | |
| make -C custombuild tag-image | |
| - name: Clean up SSH key | |
| if: ${{ always() }} | |
| run: | | |
| ssh-add -D | |
| ssh-agent -k | |
| echo "SSH_AUTH_SOCK=" >> "$GITHUB_ENV" | |
| echo "SSH_AGENT_PID=" >> "$GITHUB_ENV" |