Merge pull request #329 from tuwien-csd/266-split-card-content-into-l… #241
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: release | |
env: | |
REGISTRY: ghcr.io | |
is-master-branch: ${{ github.ref == 'refs/heads/master' }} | |
is-next-branch: ${{ github.ref == 'refs/heads/next' }} | |
is-version-tag: ${{ startsWith(github.ref, 'refs/tags/v') }} | |
on: | |
push: | |
branches: | |
- master | |
- next | |
tags: | |
- v* | |
workflow_dispatch: | |
permissions: | |
contents: read | |
packages: write | |
jobs: | |
container-build-publish: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Log in to the Container registry | |
uses: docker/login-action@v3 | |
with: | |
registry: ${{ env.REGISTRY }} | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Extract metadata (tags, labels) for Docker | |
id: meta | |
uses: docker/metadata-action@v5 | |
with: | |
images: ${{ env.REGISTRY }}/${{ github.repository }} | |
# git tag: v1.2.3, output: 1.2.3 | |
tags: | | |
type=semver,pattern={{version}},enable=${{ env.is-version-tag == 'true'}} | |
type=raw,value={{branch}},enable=${{ env.is-master-branch == 'true' || env.is-next-branch == 'true' }} | |
type=raw,value=latest | |
- name: Build and push Docker image | |
uses: docker/build-push-action@v5 | |
with: | |
context: . | |
push: true | |
tags: ${{ steps.meta.outputs.tags }} | |
labels: ${{ steps.meta.outputs.labels }} |