Skip to content

Commit

Permalink
Adjust workflow triggers (#305)
Browse files Browse the repository at this point in the history
* Test commit

* Add new triggers

* Reorder git commands
  • Loading branch information
sven1103 authored Feb 28, 2022
1 parent be00b96 commit 83a9637
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 8 deletions.
9 changes: 7 additions & 2 deletions .github/workflows/build_package.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
name: Build Maven Package

on: [push]

on:
push:
branches:
- '*'
pull_request:
# The branches below must be a subset of the branches above
branches: [ main, master ]
jobs:
package:
runs-on: ubuntu-latest
Expand Down
13 changes: 8 additions & 5 deletions .github/workflows/create-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ jobs:
|| contains(github.event.inputs.versionTag, 'rc')) }}
uses: actions/[email protected]
with:
github-token: ${{secrets.GITHUB_TOKEN}}
github-token: ${{secrets.JOHNNY_Q5_REPORTS_TOKEN}}
script: |
await github.request(`POST /repos/${{ github.repository }}/releases`, {
tag_name: "${{ github.event.inputs.versionTag }}",
Expand All @@ -55,7 +55,7 @@ jobs:
|| contains(github.event.inputs.versionTag, 'rc')) }}
uses: actions/[email protected]
with:
github-token: ${{secrets.GITHUB_TOKEN}}
github-token: ${{secrets.JOHNNY_Q5_REPORTS_TOKEN}}
script: |
await github.request(`POST /repos/${{ github.repository }}/releases`, {
tag_name: "${{ github.event.inputs.versionTag }}",
Expand All @@ -71,16 +71,19 @@ jobs:
- name: Switch to new branch
run: git checkout -b release/set-version-to-${{ github.event.inputs.versionTag }}

- name: Set remote branch
run: git push --set-upstream origin release/set-version-to-${{ github.event.inputs.versionTag }}

- name: Checkin commit
run: git commit . -m 'Set version to ${{ github.event.inputs.versionTag }}'

- name: Set remote branch
run: git push --set-upstream origin release/set-version-to-${{ github.event.inputs.versionTag }}
- name: Push to Github
run: git push

- name: Open PR with version bump
uses: actions/[email protected]
with:
github-token: ${{secrets.GITHUB_TOKEN}}
github-token: ${{secrets.JOHNNY_Q5_REPORTS_TOKEN}}
script: |
await github.request(`POST /repos/${{ github.repository }}/pulls`, {
title: 'Update version to ${{ github.event.inputs.versionTag }}',
Expand Down
8 changes: 7 additions & 1 deletion .github/workflows/run_tests.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
name: Run Maven Tests

on: [push]
on:
push:
branches:
- '*'
pull_request:
# The branches below must be a subset of the branches above
branches: [ main, master ]

jobs:
test:
Expand Down

0 comments on commit 83a9637

Please sign in to comment.