Skip to content

Symfony 6.4 upgrade #1322

Symfony 6.4 upgrade

Symfony 6.4 upgrade #1322

Workflow file for this run

name: Build docker container for the SP Dashboard
on:
pull_request:
release:
types: [published]
push:
branches: [develop]
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-20.04
permissions:
packages: write
contents: read
steps:
- name: Check out the repo
uses: actions/checkout@v4
- name: Get commit SHA and time
id: commit_details
run: |
GIT_COMMIT_TIME=$(git show -s --format=%ci $GITHUB_SHA)
echo "::set-output name=commit_time::$GIT_COMMIT_TIME"
echo "::set-output name=sha::$GITHUB_SHA"
REF_NAME=${GITHUB_REF#refs/*/}
echo "::set-output name=ref_name::$REF_NAME"
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- 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 metadata for the container
id: meta
uses: docker/metadata-action@v5
with:
images: |
ghcr.io/surfnet/sp-dashboard/spdashboard
tags: |
type=ref,event=tag
type=ref,event=branch
type=ref,event=pr
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=semver,pattern={{major}}
- name: Build the container and push to GitHub Packages
uses: docker/build-push-action@v5
with:
context: .
build-args: |
APP_VERSION=${{ steps.commit_details.outputs.ref_name }}
GIT_SHA=${{ steps.commit_details.outputs.sha }}
GIT_COMMIT_TIME=${{ steps.commit_details.outputs.commit_time }}
file: docker/Dockerfile
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}