Skip to content

Commit 7c6a707

Browse files
committed
Add Backport Issue Workflow
* Fix workflows according to the repository renaming * Move utility scripts into the `utils` directory
1 parent 070fd9e commit 7c6a707

13 files changed

+66
-18
lines changed

Diff for: .github/workflows/spring-artifactory-gradle-release-staging.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -58,12 +58,12 @@ jobs:
5858
- name: Checkout Common Repo
5959
uses: actions/checkout@v4
6060
with:
61-
repository: artembilan/spring-messaging-build-tools
61+
repository: artembilan/spring-github-workflows
6262
path: build
6363
show-progress: false
6464

6565
- name: Copy the spring-project-init.gradle
66-
run: rsync build/spring-project-init.gradle ~/.gradle/init.d/
66+
run: rsync build/utils/spring-project-init.gradle ~/.gradle/init.d/
6767

6868
- uses: jfrog/setup-jfrog-cli@v3
6969

Diff for: .github/workflows/spring-artifactory-gradle-snapshot.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -40,12 +40,12 @@ jobs:
4040
- name: Checkout Common Repo
4141
uses: actions/checkout@v4
4242
with:
43-
repository: artembilan/spring-messaging-build-tools
43+
repository: artembilan/spring-github-workflows
4444
path: build
4545
show-progress: false
4646

4747
- name: Copy the spring-project-init.gradle
48-
run: rsync build/spring-project-init.gradle ~/.gradle/init.d/
48+
run: rsync build/utils/spring-project-init.gradle ~/.gradle/init.d/
4949

5050
- uses: jfrog/setup-jfrog-cli@v3
5151

Diff for: .github/workflows/spring-artifactory-promote-central.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ jobs:
3838

3939
- uses: actions/checkout@v4
4040
with:
41-
repository: artembilan/spring-messaging-build-tools
41+
repository: artembilan/spring-github-workflows
4242
show-progress: false
4343

4444
- uses: jfrog/setup-jfrog-cli@v3
@@ -50,7 +50,7 @@ jobs:
5050
- name: Download Release Files
5151
run: |
5252
jfrog rt download \
53-
--spec release-files-spec.json \
53+
--spec utils/release-files-spec.json \
5454
--spec-vars "buildname=${{ inputs.buildName }};buildnumber=${{ inputs.buildNumber }}"
5555
5656
# Create checksums, signatures and create staging repo on central and upload

Diff for: .github/workflows/spring-backport-issue.yml

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: Backport GH Issue
2+
3+
on:
4+
workflow_call:
5+
secrets:
6+
GH_ACTIONS_REPO_TOKEN:
7+
required: true
8+
9+
jobs:
10+
build:
11+
runs-on: ubuntu-latest
12+
steps:
13+
14+
- uses: actions/checkout@v4
15+
with:
16+
show-progress: false
17+
18+
- name: Create Backport Issue
19+
env:
20+
GITHUB_TOKEN: ${{ secrets.GH_ACTIONS_REPO_TOKEN }}
21+
GITHUB_EVENT: ${{ toJSON(github.event) }}
22+
run: |
23+
wget https://github.com/spring-io/backport-bot/releases/download/latest/backport-bot-0.0.1-SNAPSHOT.jar
24+
java -jar backport-bot-0.0.1-SNAPSHOT.jar --github.accessToken="$GITHUB_TOKEN" --github.event_name "$GITHUB_EVENT_NAME" --github.event "$GITHUB_EVENT"

Diff for: README.md

+15-7
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,10 @@ They perform Gradle `check` task and Maven `verify` goal, respectively.
3333
The caller workflow is as simple as follows.
3434

3535
#### Gradle Pull Request caller workflow:
36-
https://github.com/artembilan/spring-messaging-build-tools/blob/decee2963c926c34f1f52bf373a3bc1dc09f1724/samples/pr-build-gradle.yml#L1-L10
36+
https://github.com/artembilan/spring-github-workflows/blob/decee2963c926c34f1f52bf373a3bc1dc09f1724/samples/pr-build-gradle.yml#L1-L10
3737

3838
#### Maven Pull Request caller workflow:
39-
https://github.com/artembilan/spring-messaging-build-tools/blob/decee2963c926c34f1f52bf373a3bc1dc09f1724/samples/pr-build-maven.yml#L1-L10
39+
https://github.com/artembilan/spring-github-workflows/blob/decee2963c926c34f1f52bf373a3bc1dc09f1724/samples/pr-build-maven.yml#L1-L10
4040

4141
You can add more branches to react for pull request events.
4242

@@ -45,10 +45,10 @@ They use JFrog CLI action to be able to publish artifacts into `libs-snapshot-lo
4545
The Gradle workflow can be supplied with Gradle Enterprise secrets.
4646

4747
#### Gradle SNAPSHOT caller workflow:
48-
https://github.com/artembilan/spring-messaging-build-tools/blob/decee2963c926c34f1f52bf373a3bc1dc09f1724/samples/ci-snapshot-gradle.yml#L1-L18
48+
https://github.com/artembilan/spring-github-workflows/blob/decee2963c926c34f1f52bf373a3bc1dc09f1724/samples/ci-snapshot-gradle.yml#L1-L18
4949

5050
#### Maven SNAPSHOT caller workflow:
51-
https://github.com/artembilan/spring-messaging-build-tools/blob/decee2963c926c34f1f52bf373a3bc1dc09f1724/samples/ci-snapshot-maven.yml#L1-L13
51+
https://github.com/artembilan/spring-github-workflows/blob/decee2963c926c34f1f52bf373a3bc1dc09f1724/samples/ci-snapshot-maven.yml#L1-L13
5252

5353
## Release Workflow
5454

@@ -75,7 +75,7 @@ The `gh release create` command is performed on a tag for just released version.
7575
And in the end the milestone is closed and specific Slack channel is notified about release (if `SPRING_RELEASE_SLACK_WEBHOOK_URL` secret is present in the repository).
7676

7777
#### Example of Release caller workflow:
78-
https://github.com/artembilan/spring-messaging-build-tools/blob/decee2963c926c34f1f52bf373a3bc1dc09f1724/samples/release.yml#L1-L25
78+
https://github.com/artembilan/spring-github-workflows/blob/decee2963c926c34f1f52bf373a3bc1dc09f1724/samples/release.yml#L1-L25
7979

8080
Such a workflow must be on every branch which is supposed to be released via GitHub actions.
8181

@@ -87,7 +87,7 @@ In the end you just need to go to the `Actions` tab on your project, press `Run
8787
Such a release workflow can also be scheduled (`cron`, fo example) against branches matrix.
8888

8989
#### Scheduler workflow example:
90-
https://github.com/artembilan/spring-messaging-build-tools/blob/3231d7b9b4fcd05afff3db32d34aa37565535ccb/samples/schedule-releases.yml#L1-L19
90+
https://github.com/artembilan/spring-github-workflows/blob/3231d7b9b4fcd05afff3db32d34aa37565535ccb/samples/schedule-releases.yml#L1-L19
9191

9292
> **Warning**
9393
> The [spring-artifactory-release.yml](.github/workflows/spring-artifactory-release.yml) already uses 3 of 4 levels of nested reusable workflows.
@@ -101,7 +101,15 @@ For example, [Spring Integration for AWS](https://github.com/spring-projects/spr
101101
Other projects may check out their samples repository and setup release version to perform smoke tests against just staged artifacts.
102102

103103
#### Verify staged workflow sample:
104-
https://github.com/artembilan/spring-messaging-build-tools/blob/dbd138bf504abec593bdadd882cc7a450d8eb0df/samples/verify-staged-artifacts.yml#L1-L28
104+
https://github.com/artembilan/spring-github-workflows/blob/dbd138bf504abec593bdadd882cc7a450d8eb0df/samples/verify-staged-artifacts.yml#L1-L28
105+
106+
## Backport GitHub Issue Workflow
107+
108+
The [spring-backport-issue.yml](.github/workflows/spring-backport-issue.yml) uses [Spring Backport Bot](https://github.com/spring-io/backport-bot) to create a back-port issue according to the event configured in a caller workflow.
109+
See its documentation for labeling convention and respective GitHub events for calling this workflow.
110+
111+
#### Backport Issue caller workflow example:
112+
105113

106114
## Gradle and Artifactory
107115

Diff for: samples/backport-issue.yml

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
name: Backport Issue
2+
3+
on:
4+
issues:
5+
types: [labeled]
6+
pull_request:
7+
types: [labeled]
8+
push:
9+
branches:
10+
- '*.x'
11+
12+
jobs:
13+
build_snapshot:
14+
uses: artembilan/spring-github-workflows/.github/workflows/spring-backport-issue.yml@main
15+
secrets:
16+
GH_ACTIONS_REPO_TOKEN: ${{ secrets.GH_ACTIONS_REPO_TOKEN }}

Diff for: samples/ci-snapshot-gradle.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ on:
88

99
jobs:
1010
build-snapshot:
11-
uses: artembilan/spring-messaging-build-tools/.github/workflows/spring-artifactory-gradle-snapshot.yml@main
11+
uses: artembilan/spring-github-workflows/.github/workflows/spring-artifactory-gradle-snapshot.yml@main
1212
with:
1313
gradleTasks: dist
1414
secrets:

Diff for: samples/ci-snapshot-maven.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,6 @@ on:
88

99
jobs:
1010
build_snapshot:
11-
uses: artembilan/spring-messaging-build-tools/.github/workflows/spring-artifactory-maven-snapshot.yml@main
11+
uses: artembilan/spring-github-workflows/.github/workflows/spring-artifactory-maven-snapshot.yml@main
1212
secrets:
1313
JF_ARTIFACTORY_SPRING: ${{ secrets.JF_ARTIFACTORY_SPRING }}

Diff for: samples/pr-build-gradle.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,4 @@ on:
77

88
jobs:
99
build-pull-request:
10-
uses: artembilan/spring-messaging-build-tools/.github/workflows/spring-gradle-pull-request-build.yml@main
10+
uses: artembilan/spring-github-workflows/.github/workflows/spring-gradle-pull-request-build.yml@main

Diff for: samples/pr-build-maven.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,4 @@ on:
77

88
jobs:
99
build:
10-
uses: artembilan/spring-messaging-build-tools/.github/workflows/spring-maven-pull-request-build.yml@main
10+
uses: artembilan/spring-github-workflows/.github/workflows/spring-maven-pull-request-build.yml@main

Diff for: samples/release.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ run-name: Release current version for branch ${{ github.ref_name }}
77

88
jobs:
99
release:
10-
uses: artembilan/spring-messaging-build-tools/.github/workflows/spring-artifactory-release.yml@main
10+
uses: artembilan/spring-github-workflows/.github/workflows/spring-artifactory-release.yml@main
1111
with:
1212
buildToolArgs: dist
1313
secrets:
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)