Skip to content

Merge pull request #313 from projectsyn/renovate/renovate-38.x-lockfile #353

Merge pull request #313 from projectsyn/renovate/renovate-38.x-lockfile

Merge pull request #313 from projectsyn/renovate/renovate-38.x-lockfile #353

Workflow file for this run

name: Build & Push Container Image
on:
push:
branches:
- master
tags:
- v*
jobs:
build:
runs-on: ubuntu-latest
env:
IMAGE: ${{ github.repository }}
steps:
- uses: actions/checkout@v4
- name: Set image version latest
if: github.ref == 'refs/heads/master'
run: echo "VERSION=latest" >> ${GITHUB_ENV}
- name: Set image version from tag
if: startsWith(github.ref, 'refs/tags/v')
run: echo "VERSION=$(echo ${GITHUB_REF#refs/tags/})" >> ${GITHUB_ENV}
- name: Login to ghcr.io
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push
id: docker_build
uses: docker/build-push-action@v6
with:
push: true
tags: 'ghcr.io/${{ env.IMAGE }}:${{ env.VERSION }}'