Try to build #7
Workflow file for this run
This file contains 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 | |
on: | |
push: | |
branches: | |
- '*' | |
- '!gh-pages' | |
tags: | |
- '*' | |
pull_request: | |
branches: | |
- '*' | |
- '!gh-pages' | |
jobs: | |
authgear-image-custom: | |
runs-on: ubuntu-22.04 | |
if: ${{ github.repository == 'authgear/authgear-server' }} | |
steps: | |
- uses: actions/checkout@v3 | |
# 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 | |
ssh-agent -a $SSH_AUTH_SOCK | |
printf "$AUTHGEAR_PRIVATE_DEPLOY_KEY" | base64 --decode | ssh-add - | |
echo "SSH_AUTH_SOCK=$SSH_AUTH_SOCK" >> "$GITHUB_ENV" | |
- run: make -C custombuild build-image TARGET=authgearx IMAGE_NAME=authgear-server-custom | |
- name: Push to HK | |
env: | |
DOCKER_PASSWORD: ${{ secrets.AUTHGEAR_CUSTOM_BUILD_SERVICE_ACCOUNT_KEY_HK }} | |
REPO: ${{ secrets.AUTHGEAR_CUSTOM_BUILD_REPO_HK }} | |
REPO_PREFIX: ${{ secrets.AUTHGEAR_CUSTOM_BUILD_REPO_PREFIX_HK }} | |
run: | | |
make -C custombuild tag-image IMAGE_NAME=authgear-server-custom REMOTE_IMAGE_NAME="$REPO_PREFIX/authgear-server" | |
printf "$DOCKER_PASSWORD" | docker login --username _json_key_base64 --password-stdin "$REPO" | |
make -C custombuild push-image REMOTE_IMAGE_NAME="$REPO_PREFIX/authgear-server" | |
- name: Push to US | |
env: | |
DOCKER_PASSWORD: ${{ secrets.AUTHGEAR_CUSTOM_BUILD_SERVICE_ACCOUNT_KEY_US }} | |
REPO: ${{ secrets.AUTHGEAR_CUSTOM_BUILD_REPO_US }} | |
REPO_PREFIX: ${{ secrets.AUTHGEAR_CUSTOM_BUILD_REPO_PREFIX_US }} | |
run: | | |
make -C custombuild tag-image IMAGE_NAME=authgear-server-custom REMOTE_IMAGE_NAME="$REPO_PREFIX/authgear-server" | |
printf "$DOCKER_PASSWORD" | docker login --username _json_key_base64 --password-stdin "$REPO" | |
make -C custombuild push-image REMOTE_IMAGE_NAME="$REPO_PREFIX/authgear-server" | |
portal-image-custom: | |
runs-on: ubuntu-22.04 | |
if: ${{ github.repository == 'authgear/authgear-server' }} | |
steps: | |
- uses: actions/checkout@v3 | |
# 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 | |
ssh-agent -a $SSH_AUTH_SOCK | |
printf "$AUTHGEAR_PRIVATE_DEPLOY_KEY" | base64 --decode | ssh-add - | |
echo "SSH_AUTH_SOCK=$SSH_AUTH_SOCK" >> "$GITHUB_ENV" | |
- run: make -C custombuild build-image TARGET=portalx IMAGE_NAME=authgear-portal-custom | |
- name: Push to HK | |
env: | |
DOCKER_PASSWORD: ${{ secrets.AUTHGEAR_CUSTOM_BUILD_SERVICE_ACCOUNT_KEY_HK }} | |
REPO: ${{ secrets.AUTHGEAR_CUSTOM_BUILD_REPO_HK }} | |
REPO_PREFIX: ${{ secrets.AUTHGEAR_CUSTOM_BUILD_REPO_PREFIX_HK }} | |
run: | | |
make -C custombuild tag-image IMAGE_NAME=authgear-portal-custom REMOTE_IMAGE_NAME="$REPO_PREFIX/authgear-portal" | |
printf "$DOCKER_PASSWORD" | docker login --username _json_key_base64 --password-stdin "$REPO" | |
make -C custombuild push-image REMOTE_IMAGE_NAME="$REPO_PREFIX/authgear-portal" | |
- name: Push to US | |
env: | |
DOCKER_PASSWORD: ${{ secrets.AUTHGEAR_CUSTOM_BUILD_SERVICE_ACCOUNT_KEY_US }} | |
REPO: ${{ secrets.AUTHGEAR_CUSTOM_BUILD_REPO_US }} | |
REPO_PREFIX: ${{ secrets.AUTHGEAR_CUSTOM_BUILD_REPO_PREFIX_US }} | |
run: | | |
make -C custombuild tag-image IMAGE_NAME=authgear-portal-custom REMOTE_IMAGE_NAME="$REPO_PREFIX/authgear-portal" | |
printf "$DOCKER_PASSWORD" | docker login --username _json_key_base64 --password-stdin "$REPO" | |
make -C custombuild push-image REMOTE_IMAGE_NAME="$REPO_PREFIX/authgear-portal" |