Release test-hydra Image #4
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: Release test-hydra Image | |
on: | |
workflow_dispatch: | |
inputs: | |
tags: | |
description: 'Builds and pushes test-hydra image' | |
push: | |
branches: | |
- main | |
- alpha | |
- beta | |
paths: | |
- "services/test-hydra/**" | |
env: | |
image-version: 0.0.1 | |
registry: ghcr.io | |
registry-url: ghcr.io/aardvarkllc | |
image-name: test-hydra | |
jobs: | |
build-and-publish-images: | |
name: Build and publish images | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
packages: write | |
attestations: write | |
id-token: write | |
steps: | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v3 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup buildx | |
run: docker buildx create --platform linux/amd64,linux/arm64 --use | |
- name: Login to Github Container Registry | |
uses: docker/login-action@v3 | |
with: | |
registry: ${{env.registry}} | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
# TODO: ensure -mydebug is removed for production | |
- name: Build and push test-hydra image | |
run: >- | |
cd services/test-hydra; | |
docker buildx build . -t ${{env.registry-url}}/${{env.image-name}}:${{env.image-version}} -t ${{env.registry-url}}/${{env.image-name}}:latest -f ./Dockerfile --output="type=registry" --platform linux/arm64,linux/amd64 |