Skip to content

Commit

Permalink
Add workflow_dispatch to the release workflow in GHA
Browse files Browse the repository at this point in the history
  • Loading branch information
quartje committed May 7, 2024
1 parent ab61163 commit 4b3a8c6
Showing 1 changed file with 51 additions and 0 deletions.
51 changes: 51 additions & 0 deletions .github/workflows/tag-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: tag-release
on:
push:
tags:
- "*.*.*"
workflow_dispatch:

jobs:
build:
permissions:
contents: write

runs-on: ubuntu-latest
timeout-minutes: 30
env:
COMPONENT_NAME: OpenConext-user-lifecycle
if: always()
steps:
- name: Checkout
uses: actions/checkout@v4
with:
repository: OpenConext/Stepup-Build
- name: Output the semver tag to the tag variable
id: vars
run: echo "tag=${GITHUB_REF#refs/*/}" >> $GITHUB_OUTPUT
- name: Run release script
run: ./stepup-build.sh ${COMPONENT_NAME} --tag ${{ steps.vars.outputs.tag }}
- name: Grab the archive filename
id: archive
run: |
echo "archive=$(find . -maxdepth 1 -name "$COMPONENT_NAME*.tar.bz2" -printf '%f\n')" >> $GITHUB_OUTPUT
echo "shasum=$(find . -maxdepth 1 -name "$COMPONENT_NAME*.sha" -printf '%f\n')" >> $GITHUB_OUTPUT
- name: Release
uses: softprops/action-gh-release@v2
with:
files: |
${{ steps.archive.outputs.archive }}
${{ steps.archive.outputs.shasum }}
token: ${{ secrets.GITHUB_TOKEN }}
fail_on_unmatched_files: true
generate_release_notes: true

after_build:
needs: build
runs-on: ubuntu-latest
steps:
- name: Trigger Docker container build
uses: benc-uk/workflow-dispatch@v1
with:
workflow: build-push-docker-image.yml

0 comments on commit 4b3a8c6

Please sign in to comment.