Skip to content

Commit

Permalink
Add step to create GitHub release on deploy to prod
Browse files Browse the repository at this point in the history
  • Loading branch information
cskrov committed May 23, 2024
1 parent ba8d8fa commit 5c91bbf
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion .github/workflows/deploy-to-prod.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
name: Deploy
if: github.ref == 'refs/heads/main'
permissions:
contents: read
contents: write
id-token: write
runs-on: ubuntu-latest
steps:
Expand Down Expand Up @@ -43,3 +43,15 @@ jobs:
RESOURCE: nais/nais.yaml
VAR: image=${{ steps.image.outputs.image }}
timeout-minutes: 3

- name: Generate release version
id: version
run: |
TIME=$(TZ="Europe/Oslo" date +%Y.%m.%d-%H.%M)
COMMIT=$(git rev-parse --short=7 HEAD)
VERSION=$TIME-$COMMIT
echo "version=${VERSION}" >> $GITHUB_OUTPUT
- uses: ncipollo/release-action@v1
with:
tag: ${{ steps.version.outputs.version }}

0 comments on commit 5c91bbf

Please sign in to comment.