Skip to content
# This action pre-builds the dev-base image and pushes it to the GitHub Container Registry (GHCR)
name: Publish outpost-api-service to github container registry
on:
push:
branches: [develop, staging, production, feature/arch]
env:

Check failure on line 9 in .github/workflows/publish-outpost-api-image.yml

View workflow run for this annotation

GitHub Actions / Publish outpost-api-service to github container registry

Invalid workflow file

The workflow is not valid. .github/workflows/publish-outpost-api-image.yml (Line: 9, Col: 5): Unexpected value ''
# BUILDX_NO_DEFAULT_ATTESTATIONS: 1
jobs:
publish-outpost-api-image:
runs-on: ubuntu-latest
strategy:
matrix:
os: [ubuntu-latest]
arch: [x64, arm64, linux/arm64/v8]
# platforms:
# - linux/amd64
# - linux/arm64
# - linux/arm64/v8
steps:
- name: "Checkout GitHub Action"
uses: actions/checkout@main
- name: "Login to GitHub Container Registry"
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{github.actor}}
password: ${{secrets.GITHUB_TOKEN}}
- name: Set Docker Image Tag
id: vars
run: |
BRANCH_NAME=${GITHUB_REF#refs/heads/}
if [[ "$BRANCH_NAME" == "develop" ]]; then
echo "tag=development" >> $GITHUB_ENV
elif [[ "$BRANCH_NAME" == "staging" ]]; then
echo "tag=staging" >> $GITHUB_ENV
elif [[ "$BRANCH_NAME" == "production" ]]; then
echo "tag=latest" >> $GITHUB_ENV
else
echo "tag=default" >> $GITHUB_ENV
fi
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build and push outpost api docker image
uses: docker/build-push-action@v5
with:
context: .
tags: ghcr.io/wearefuturegov/outpost-api-service:${{ env.tag }}
file: Dockerfile.production
platforms: ${{ matrix.platforms }}
push: true
outputs: type=image,name=target,annotation-index.org.opencontainers.image.description=Outpost API Service image
labels: org.opencontainers.image.source=https://github.com/wearefuturegov/outpost-api-service