Skip to content

Set version and created tags on the image #28

Set version and created tags on the image

Set version and created tags on the image #28

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: 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
- 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: |

Check failure on line 48 in .github/workflows/build-ssp.container.yaml

View workflow run for this annotation

GitHub Actions / Build the SSP dev container

Invalid workflow file

The workflow is not valid. .github/workflows/build-ssp.container.yaml (Line: 48, Col: 17): Unrecognized named-value: 'events'. Located at position 1 within expression: events.created_at
ghcr.io/openconext/openconext-devssp/devssp:latest
ghcr.io/openconext/openconext-devssp/devssp:${{ github.sha }}
org.opencontainers.image.created: ${{ events.created_at }}
org.opencontainers.image.version: ${{ version.version }}