Skip to content

Commit

Permalink
ci: publish on tag
Browse files Browse the repository at this point in the history
  • Loading branch information
olavis committed Mar 6, 2023
1 parent 1900ce5 commit 76f7605
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/on-tag.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
on:
push:
tags:
- v*

jobs:
set-tag-ref:
name: set-tag-ref
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- name: Create tag ref
id: create-tag-ref
run: |
TAG_REF=$(echo $GITHUB_REF | cut -d / -f 3)
echo "tag-ref=$TAG_REF" >> $GITHUB_OUTPUT
outputs:
tag-ref: ${{ steps.create-tag-ref.outputs.tag-ref }}

publish-prod:
uses: ./.github/workflows/publish.yaml
with:
IMAGE_TAG: production

publish-tag:
needs: [set-tag-ref]
uses: ./.github/workflows/publish.yaml
with:
IMAGE_TAG: ${{ needs.set-tag-ref.outputs.tag-ref }}

0 comments on commit 76f7605

Please sign in to comment.