Skip to content

Commit

Permalink
ci: add auto-tag workflows (#243)
Browse files Browse the repository at this point in the history
  • Loading branch information
spaenleh authored Apr 5, 2023
1 parent db7f54f commit 619bf92
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 3 deletions.
15 changes: 15 additions & 0 deletions .github/workflows/auto-tag.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: Auto Tag

on:
issues:
types:
- reopened
- closed
pull_request:
types:
- closed

jobs:
auto-tag:
name: Auto tag issues and PRs
uses: graasp/graasp-deploy/.github/workflows/auto-tag.yml@v1
12 changes: 9 additions & 3 deletions .github/workflows/release-please.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,14 @@ jobs:
# creates minor and major tags that follow the latest release
- name: Tag major and minor versions
uses: jacobsvante/tag-major-minor-action@v0.1
if: ${{ steps.release.outputs.release_created }}
if: ${{ steps.release.outputs.releases_created }}
with:
major: ${{ steps.release.outputs.major }}
minor: ${{ steps.release.outputs.minor }}

# put created tag in an env variable to be sent to the dispatch
- name: Set tag
if: ${{ steps.release.outputs.release_created }}
if: ${{ steps.release.outputs.releases_created }}
id: set-tag
run: |
REPOSITORY=$(echo '${{ github.repository }}')
Expand All @@ -40,10 +40,16 @@ jobs:
# Trigger an 'on: repository_dispatch' workflow to run in graasp-deploy repository
- name: Push tag to Graasp Deploy (Staging)
if: ${{ steps.release.outputs.release_created }}
if: ${{ steps.release.outputs.releases_created }}
uses: peter-evans/repository-dispatch@v2
with:
token: ${{ secrets.REPO_ACCESS_TOKEN }}
repository: graasp/graasp-deploy
event-type: update-staging-version
client-payload: ${{steps.set-tag.outputs.json}}

- name: Auto Tag
uses: graasp/graasp-deploy/.github/actions/auto-tag-after-release@v1
with:
releases_created: ${{ steps.release.outputs.releases_created }}
tag_name: ${{ steps.release.outputs.tag_name }}

0 comments on commit 619bf92

Please sign in to comment.