Skip to content

Commit

Permalink
Merge pull request #2 from GeoWerkstatt/publish-on-release
Browse files Browse the repository at this point in the history
Update on release
  • Loading branch information
tschumpr authored Nov 20, 2023
2 parents 52f3a90 + 20b2172 commit 1684875
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,17 @@
name: Publish

on:
push:
branches:
- main
release:
types: [released]
workflow_dispatch:
inputs:
TAG_NAME:
description: "Tag name"
required: true

env:
REGISTRY: ghcr.io
TAG_NAME: ${{ github.event.inputs.TAG_NAME || github.event.release.tag_name }}

jobs:
retag-docker-image:
Expand All @@ -18,13 +22,9 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v4

- name: Extract version
id: extract_version
uses: Saionaro/extract-package-version@v1.2.1

- name: Set environment variables
run: |
echo VERSION=${{ steps.extract_version.outputs.version }} >> $GITHUB_ENV
echo VERSION=${TAG_NAME#v} >> $GITHUB_ENV
echo IMAGE_NAME=$REGISTRY/$(echo ${GITHUB_REPOSITORY,,}) >> $GITHUB_ENV
echo COMMITED_AT=$(git show -s --format=%cI `git rev-parse HEAD`) >> $GITHUB_ENV
echo REVISION=$(git rev-parse --short HEAD) >> $GITHUB_ENV
Expand Down

0 comments on commit 1684875

Please sign in to comment.