Skip to content

Commit 691c9b6

Browse files
authored
Added shared branches (#33)
* Added shared workflows * Added shared branches * Added shared branches
1 parent d71bba5 commit 691c9b6

File tree

4 files changed

+23
-149
lines changed

4 files changed

+23
-149
lines changed

.github/workflows/org-banner.yml

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

.github/workflows/release-branch.yml

Lines changed: 15 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -23,63 +23,19 @@ concurrency:
2323
cancel-in-progress: false
2424

2525
jobs:
26-
ci-readme:
27-
runs-on: ubuntu-latest
28-
environment: release
29-
steps:
30-
- uses: actions/create-github-app-token@v1
31-
id: github-app
32-
with:
33-
app-id: ${{ vars.GH_APP_ID }}
34-
private-key: ${{ secrets.GH_APP_PRIVATE_KEY }}
35-
- name: Checkout
36-
uses: actions/checkout@v4
37-
with:
38-
fetch-depth: 0
39-
token: ${{ steps.github-app.outputs.token }}
40-
- uses: cloudposse-github-actions/readme@main
41-
with:
42-
token: ${{ steps.github-app.outputs.token }}
43-
readme_enabled: true
44-
banner_enabled: true
45-
validate_readme: true
46-
commit_method: 'commit'
47-
commit_push_options: '--force-with-lease'
26+
readme:
27+
uses: cloudposse-github-actions/.github/.github/workflows/shared-readme.yml@main
28+
name: "readme"
29+
if: ${{ github.event_name == 'push' }}
30+
with:
31+
runs-on: ${{ inputs.runs-on }}
32+
secrets: inherit
4833

49-
release-controller:
50-
runs-on: ubuntu-latest
51-
needs: [ci-readme]
52-
permissions:
53-
# write permission is required to create a github release
54-
contents: write
55-
# write permission is required for autolabeler
56-
# otherwise, read permission is required at least
57-
pull-requests: write
58-
steps:
59-
- name: Checkout
60-
uses: actions/checkout@v4
61-
with:
62-
fetch-depth: 0
63-
64-
- name: Draft release
65-
id: release
66-
uses: cloudposse/github-action-auto-release@v1
67-
with:
68-
token: ${{ secrets.GITHUB_TOKEN }}
69-
config-name: auto-release.yml
70-
71-
major-release-tagger:
72-
runs-on: ubuntu-latest
73-
needs: [release-controller]
74-
steps:
75-
- uses: cloudposse/github-action-major-release-tagger@v1
76-
with:
77-
token: ${{ secrets.GITHUB_TOKEN }}
78-
79-
release-branch-manager:
80-
runs-on: ubuntu-latest
81-
needs: [release-controller]
82-
steps:
83-
- uses: cloudposse/github-action-release-branch-manager@v1
84-
with:
85-
token: ${{ secrets.GITHUB_TOKEN }}
34+
release:
35+
needs: [ readme ]
36+
name: "release"
37+
if: ${{ always() && github.event_name == 'push' && needs.ci.result == 'success' }}
38+
uses: cloudposse-github-actions/.github/.github/workflows/shared-auto-release.yml@main
39+
with:
40+
publish: ${{ inputs.publish }}
41+
secrets: inherit

.github/workflows/release-published.yml

Lines changed: 3 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -10,19 +10,6 @@ permissions:
1010
deployments: write
1111

1212
jobs:
13-
publish:
14-
runs-on: ubuntu-latest
15-
environment: release
16-
concurrency: release
17-
steps:
18-
- uses: actions/create-github-app-token@v1
19-
id: github-app
20-
with:
21-
app-id: ${{ vars.GH_APP_ID }}
22-
private-key: ${{ secrets.GH_APP_PRIVATE_KEY }}
23-
- uses: cloudposse/github-action-major-release-tagger@v1
24-
env:
25-
GITHUB_ENV: ${{ steps.github-app.outputs.token }}
26-
- uses: cloudposse/github-action-release-branch-manager@v1
27-
with:
28-
token: ${{ steps.github-app.outputs.token }}
13+
perform:
14+
uses: cloudposse-github-actions/.github/.github/workflows/shared-release-branches.yml@main
15+
secrets: inherit

.github/workflows/scheduled.yml

Lines changed: 5 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -11,24 +11,11 @@ permissions:
1111

1212
jobs:
1313
readme:
14-
runs-on: ubuntu-latest
15-
environment: security
16-
steps:
17-
- uses: actions/create-github-app-token@v1
18-
id: github-app
19-
with:
20-
app-id: ${{ vars.GH_APP_ID }}
21-
private-key: ${{ secrets.GH_APP_PRIVATE_KEY }}
22-
- name: Checkout
23-
uses: actions/checkout@v4
24-
with:
25-
fetch-depth: 0
26-
- uses: cloudposse-github-actions/readme@main
27-
with:
28-
token: ${{ steps.github-app.outputs.token }}
29-
readme_enabled: true
30-
banner_enabled: true
31-
commit_method: 'pr'
14+
uses: cloudposse-github-actions/.github/.github/workflows/shared-readme.yml@main
15+
name: "readme"
16+
with:
17+
runs-on: ${{ inputs.runs-on }}
18+
secrets: inherit
3219

3320
scaffolding:
3421
runs-on: ubuntu-latest

0 commit comments

Comments
 (0)