Skip to content

Update build-ssp.container.yaml #32

Update build-ssp.container.yaml

Update build-ssp.container.yaml #32

name: Build the SSP dev container
on:
push:
branches:
- main
workflow_dispatch:
jobs:
build-push-ssp:
runs-on: ubuntu-latest
permissions:
packages: write
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Create version tag
id: set_version
run: |
# Get the tag that triggered the workflow if it exists
# If no tag exists, use the commit hash as the version
if [ -n "${GITHUB_TAG}" ]; then
echo "version=${GITHUB_TAG}" >> $GITHUB_OUTPUT
else
echo "version=${{ github.sha }}" >> $GITHUB_OUTPUT
fi
shell: bash
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v6
with:
context: ./docker
platforms: linux/amd64,linux/arm64
push: true
tags: |
ghcr.io/openconext/openconext-devssp/devssp:latest
ghcr.io/openconext/openconext-devssp/devssp:${{ github.sha }}
org.opencontainers.image.created: ${{ github.event.created_at }}
org.opencontainers.image.version: ${{ steps.set_version.outputs.version }}