Skip to content

Commit 0b27594

Browse files
authored
chore(ci): Update workflows to make v2 the default (#1888)
* chore(ci): Make v2 the main branch * update runner size for release * update skip checks * create tag instead of release
1 parent 871a844 commit 0b27594

9 files changed

+11
-30
lines changed

.github/auto_assign-issues.yml

Lines changed: 0 additions & 9 deletions
This file was deleted.

.github/workflows/check-build.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@ on:
3838
push:
3939
branches:
4040
- main
41-
- v2
4241
paths: # add other modules when there are under e2e tests
4342
- 'powertools-batch/**'
4443
- 'powertools-core/**'

.github/workflows/check-e2e.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ on:
1515
push:
1616
branches:
1717
- main
18-
- v2
1918
paths: # add other modules when there are under e2e tests
2019
- 'powertools-batch/**'
2120
- 'powertools-core/**'

.github/workflows/check-spotbugs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
on:
1010
pull_request:
1111
branches:
12-
- v2
12+
- main
1313
paths:
1414
- 'powertools-batch/**'
1515
- 'powertools-core/**'

.github/workflows/release-drafter.yml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,16 +15,11 @@ name: Release Drafter
1515
run-name: Release Drafter
1616

1717
jobs:
18-
<<<<<<< HEAD
19-
update_release_draft:
20-
runs-on: ubuntu-latest
21-
=======
2218
update_release:
2319
runs-on: ubuntu-latest
2420
permissions:
2521
contents: write
2622
id-token: write
27-
>>>>>>> 4a17172a (chore(automation): Update automation workflows (#1779))
2823
steps:
2924
- name: Relase Drafter
3025
uses: release-drafter/release-drafter@b1476f6e6eb133afa41ed8589daba6dc69b4d3f5

.github/workflows/release.yml

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ jobs:
8282
- id: base
8383
name: Base
8484
run: |
85-
echo build_version=$(test ${{ github.ref_name }} == "v2" && echo "v2" || echo "v1") >> $GITHUB_OUTPUT
85+
echo build_version=$(test ${{ github.ref_name }} == "main" && echo "v2" || echo "v1") >> $GITHUB_OUTPUT
8686
- id: build_matrix_v1
8787
name: Build matrix (v1)
8888
if: ${{ steps.base.outputs.build_version == 'v1' }}
@@ -123,7 +123,7 @@ jobs:
123123
retention-days: 1
124124

125125
quality:
126-
runs-on: ubuntu-latest
126+
runs-on: aws-powertools_ubuntu-latest_8-core
127127
needs:
128128
- version_seal
129129
if: ${{ inputs.skip_checks == false }}
@@ -156,7 +156,7 @@ jobs:
156156
uploadSarifReport: false
157157

158158
build:
159-
runs-on: ubuntu-latest
159+
runs-on: aws-powertools_ubuntu-latest_8-core
160160
needs:
161161
- setup
162162
- quality
@@ -183,8 +183,8 @@ jobs:
183183
mvn -B install --file pom.xml
184184
185185
publish:
186-
runs-on: ubuntu-latest
187-
if: ${{ github.repository == 'aws-powertools/powertools-lambda-java' && inputs.skip_publish == false }}
186+
runs-on: aws-powertools_ubuntu-latest_8-core
187+
if: ${{ github.repository == 'aws-powertools/powertools-lambda-java' && inputs.skip_publish == false && always() && !contains(needs.*.result, 'failure') && !contains(needs.*.result, 'cancelled') }}
188188
needs:
189189
- build
190190
environment: Release
@@ -254,11 +254,10 @@ jobs:
254254
env:
255255
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
256256
- id: tag
257-
name: Create release
257+
name: Create tag
258258
run: |
259-
gh release create v${{ inputs.version }} --target $(git rev-parse HEAD)
260-
env:
261-
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
259+
git tag -a v${{ inputs.version }} -m "Release v${{ inputs.version }}"
260+
git push origin v${{ inputs.version }}
262261
263262
docs:
264263
runs-on: ubuntu-latest

.github/workflows/security-branch-protections.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ jobs:
4343
# List of branches we want to monitor for protection changes
4444
branch:
4545
- main
46-
- v2
46+
- v1
4747
steps:
4848
- name: Checkout repository
4949
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2

.github/workflows/security-dependabot.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
runs-on: ubuntu-latest
2323
if: ${{ github.event.pull_request.user.login == 'dependabot[bot]' && github.repository == 'aws-powertools/powertools-lambda-java' }}
2424
permissions:
25-
pull-requests: read
25+
pull-requests: write
2626
steps:
2727
- id: dependabot-metadata
2828
name: Fetch Dependabot metadata

.github/workflows/security-osv.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,12 @@ on:
1313
pull_request:
1414
branches:
1515
- main
16-
- v2
1716
workflow_dispatch: {}
1817
schedule:
1918
- cron: "30 12 * * 1"
2019
push:
2120
branches:
2221
- main
23-
- v2
2422

2523
name: OpenSource Vulnerability Scanner
2624
run-name: OpenSource Vulnerability Scanner

0 commit comments

Comments
 (0)