Skip to content

galaxy-api-pub

galaxy-api-pub #47

name: galaxy-api-pub
# Workflow is triggered manually only.
on:
workflow_dispatch:
env:
CONTEXT: galaxy-api-pub
MACHINE: eb-app-api
PROCESS: pub
REGISTRY: ghcr.io
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
id-token: write
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Set up QEMU
uses: docker/setup-qemu-action@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v4
with:
driver-opts: |
memory=4g
- name: Login to GHCR
uses: docker/login-action@v4
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Get Version
run: |
echo "BUILD_DATE=$(date +'%Y%m%d')" >> $GITHUB_ENV
echo ${{ env.REGISTRY }}/${{ github.repository }}/${{ env.CONTEXT }}
- name: Metadata
uses: docker/metadata-action@v6
id: meta
with:
images: |
${{ env.REGISTRY }}/${{ github.repository }}/${{ env.CONTEXT }}
tags: |
type=raw,value=latest
type=raw,value=v${{ env.BUILD_DATE }}
- name: Build and push
uses: docker/build-push-action@v7
with:
context: ./machines/${{ env.MACHINE }}
file: ./machines/${{ env.MACHINE }}/${{ env.PROCESS }}.Dockerfile
push: true
platforms: linux/amd64,linux/arm64
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max