Skip to content

Update charts

Update charts #8

Workflow file for this run

name: Publish to GH
on:
push:
branches:
- develop
- trunk
- new-pipeline
tags:
- 'v*'
pull_request:
branches:
- develop
jobs:
build:
permissions:
packages: write
contents: read
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Docker build
uses: docker/build-push-action@v6
with:
context: .
file: Dockerfile.production
load: true
tags: vauhtijuoksu/cms:test
- name: Extract Docker metadata
if: github.event_name == 'push'
id: meta
uses: docker/metadata-action@v3
with:
images: |
name=ghcr.io/vauhtijuoksu/wwwauhtijuoksu-cms
tags: |
# sha for branch triggers
type=ref,event=branch
type=ref,event=branch,suffix=-{{sha}}
type=ref,event=pr,suffix=-{{sha}}
# semver only for version tags
type=semver,pattern={{version}}
- name: Log in to GHCR
if: github.event_name == 'push'
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin
# This should use cached image and not actually trigger a new build
- name: Build and push images
if: github.event_name == 'push'
uses: docker/build-push-action@v6
with:
context: .
file: Dockerfile.production
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}