Skip to content

Commit 83a9637

Browse files
authored
Adjust workflow triggers (#305)
* Test commit * Add new triggers * Reorder git commands
1 parent be00b96 commit 83a9637

File tree

3 files changed

+22
-8
lines changed

3 files changed

+22
-8
lines changed

.github/workflows/build_package.yml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,12 @@
11
name: Build Maven Package
22

3-
on: [push]
4-
3+
on:
4+
push:
5+
branches:
6+
- '*'
7+
pull_request:
8+
# The branches below must be a subset of the branches above
9+
branches: [ main, master ]
510
jobs:
611
package:
712
runs-on: ubuntu-latest

.github/workflows/create-release.yml

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ jobs:
4242
|| contains(github.event.inputs.versionTag, 'rc')) }}
4343
uses: actions/github-script@v4.0.2
4444
with:
45-
github-token: ${{secrets.GITHUB_TOKEN}}
45+
github-token: ${{secrets.JOHNNY_Q5_REPORTS_TOKEN}}
4646
script: |
4747
await github.request(`POST /repos/${{ github.repository }}/releases`, {
4848
tag_name: "${{ github.event.inputs.versionTag }}",
@@ -55,7 +55,7 @@ jobs:
5555
|| contains(github.event.inputs.versionTag, 'rc')) }}
5656
uses: actions/github-script@v4.0.2
5757
with:
58-
github-token: ${{secrets.GITHUB_TOKEN}}
58+
github-token: ${{secrets.JOHNNY_Q5_REPORTS_TOKEN}}
5959
script: |
6060
await github.request(`POST /repos/${{ github.repository }}/releases`, {
6161
tag_name: "${{ github.event.inputs.versionTag }}",
@@ -71,16 +71,19 @@ jobs:
7171
- name: Switch to new branch
7272
run: git checkout -b release/set-version-to-${{ github.event.inputs.versionTag }}
7373

74+
- name: Set remote branch
75+
run: git push --set-upstream origin release/set-version-to-${{ github.event.inputs.versionTag }}
76+
7477
- name: Checkin commit
7578
run: git commit . -m 'Set version to ${{ github.event.inputs.versionTag }}'
7679

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

8083
- name: Open PR with version bump
8184
uses: actions/github-script@v4.0.2
8285
with:
83-
github-token: ${{secrets.GITHUB_TOKEN}}
86+
github-token: ${{secrets.JOHNNY_Q5_REPORTS_TOKEN}}
8487
script: |
8588
await github.request(`POST /repos/${{ github.repository }}/pulls`, {
8689
title: 'Update version to ${{ github.event.inputs.versionTag }}',

.github/workflows/run_tests.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
name: Run Maven Tests
22

3-
on: [push]
3+
on:
4+
push:
5+
branches:
6+
- '*'
7+
pull_request:
8+
# The branches below must be a subset of the branches above
9+
branches: [ main, master ]
410

511
jobs:
612
test:

0 commit comments

Comments
 (0)