Ci build docker images for macos 14 #2
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: Build Docker images (MacOS) | |
on: | |
workflow_dispatch: | |
pull_request: | |
branches: | |
- main | |
env: | |
REGISTRY: ghcr.io | |
jobs: | |
build: | |
runs-on: macos-14 | |
steps: | |
- name: Set env | |
run: echo "TAG=${GITHUB_SHA::8}" >> $GITHUB_ENV | |
- name: Downcase repo | |
run: | | |
echo "REPO_LOWER=${REPO,,}" >> $GITHUB_ENV | |
env: | |
REPO: '${{ github.repository }}' | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v2 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v2 | |
- name: Github Container Login | |
uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9 | |
with: | |
registry: ${{ env.REGISTRY }} | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Build and push | |
uses: docker/build-push-action@v3 | |
with: | |
context: . | |
target: hyku-base | |
push: true | |
tags: | | |
${{ env.REGISTRY }}/${{ env.REPO_LOWER }}/macos/hyku-base:${{ env.TAG }} | |
${{ env.REGISTRY }}/${{ env.REPO_LOWER }}/macos/hyku-base:${{ github.ref_name }} | |
- name: Build and push hyku-web | |
uses: docker/build-push-action@v3 | |
with: | |
context: . | |
target: hyku-web | |
cache-from: | | |
${{ env.REGISTRY }}/${{ env.REPO_LOWER }}:${TAG} | |
push: true | |
tags: | | |
${{ env.REGISTRY }}/${{ env.REPO_LOWER }}/macos/hyku-web:${{ env.TAG }} | |
${{ env.REGISTRY }}/${{ env.REPO_LOWER }}/macos/hyku-web:${{ github.ref_name }} | |
- name: Build and push hyku-worker | |
uses: docker/build-push-action@v3 | |
with: | |
context: . | |
target: hyku-worker | |
cache-from: | | |
${{ env.REGISTRY }}/${{ env.REPO_LOWER }}:${TAG} | |
push: true | |
tags: | | |
${{ env.REGISTRY }}/${{ env.REPO_LOWER }}/macos/hyku-worker:${{ env.TAG }} | |
${{ env.REGISTRY }}/${{ env.REPO_LOWER }}/macos/hyku-worker:${{ github.ref_name }} |