Skip to content

Commit

Permalink
Add GitHub Action to trigger post-release updates across repositories
Browse files Browse the repository at this point in the history
After each release, we are currently manually performing the required
changes and udpates across our repositories.
This commit adds a GitHub Action workflow to trigger these changes
automatically.
  • Loading branch information
FroggyFlox committed Jul 3, 2023
1 parent 1d4b9d5 commit b496902
Showing 1 changed file with 54 additions and 0 deletions.
54 changes: 54 additions & 0 deletions .github/workflows/trigger_updates.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: Trigger updates
on: workflow_dispatch
jobs:
set-vars:
name: Get version, release, and notes
runs-on: ubuntu-latest
outputs:
version: ${{ steps.set-ver.outputs.version }}
release: ${{ steps.set-rel.outputs.release }}
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- name: Set Version
id: set-ver
run: |
echo "version=$(gh release list --limit 1 -R rockstor/rockstor-core | cut -f1 | cut -d "-" -f1)" >> "$GITHUB_OUTPUT"
- name: Set Release
id: set-rel
run: |
echo "release=$(gh release list --limit 1 -R rockstor/rockstor-core | cut -f1 | cut -d "-" -f2)" >> "$GITHUB_OUTPUT"
trigger_rockstor-jslibs_release:
name: Trigger a release in the rockstor-jslibs repo
runs-on: ubuntu-latest
needs: set-vars
env:
VERSION: ${{ needs.set-vars.outputs.version }}
GH_TOKEN: ${{ secrets.GH_ACTION_TOKEN }}
steps:
- name: trigger the rockstor-jslibs workflow
id: trigger-jslibs-workflow
run: |
gh workflow run update_release.yml \
-f version=$VERSION \
-f target_branch=${GITHUB_REF_NAME} \
-R rockstor/rockstor-jslibs
trigger_rockstor-rpmbuild-updates:
name: Trigger the update of the rockstor-rpmbuild repo
runs-on: ubuntu-latest
needs: set-vars
env:
VERSION: ${{ needs.set-vars.outputs.version }}
RELEASE: ${{ needs.set-vars.outputs.release }}
GH_TOKEN: ${{ secrets.GH_ACTION_TOKEN }}
steps:
- name: trigger the rockstor-jslibs workflow
id: trigger-jslibs-workflow
run: |
gh workflow run update_spec_file.yml \
-f version=$VERSION \
-f release=$RELEASE \
-f target_branch=${GITHUB_REF_NAME} \
-R rockstor/rockstor-rpmbuild

0 comments on commit b496902

Please sign in to comment.