Skip to content

Commit b3e5e57

Browse files
committed
ci: release to production on release created
1 parent f18518a commit b3e5e57

File tree

2 files changed

+21
-9
lines changed

2 files changed

+21
-9
lines changed
Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,25 @@
1+
name: release-please
2+
13
on:
24
push:
35
branches:
46
- main
5-
name: release-please
7+
68
jobs:
79
release-please:
810
runs-on: ubuntu-latest
911
steps:
1012
- uses: google-github-actions/release-please-action@v3
13+
id: release
1114
with:
1215
release-type: simple
13-
package-name: release-please-action
16+
package-name: release-please-action
17+
outputs:
18+
release_created: ${{ steps.release.outputs.release_created }}
19+
20+
deploy-prod:
21+
needs: release-please
22+
uses: ./.github/workflows/release-production.yaml
23+
if: ${{ needs.release-please.outputs.release_created }}
24+
secrets:
25+
APP_SERVICE_ACCOUNT_TOKEN: ${{ secrets.APP_SERVICE_ACCOUNT_TOKEN }}
Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,22 @@
1-
name: "Releases"
2-
3-
# This action works when creating a release
1+
name: release-to-production
42

53
on:
64
workflow_dispatch:
7-
release:
8-
types:
9-
- "released"
5+
workflow_call:
6+
secrets:
7+
APP_SERVICE_ACCOUNT_TOKEN:
8+
required: true
109

1110
jobs:
1211
tests:
1312
uses: ./.github/workflows/tests.yaml
14-
13+
1514
publish-production:
1615
needs: tests
1716
uses: ./.github/workflows/publish.yaml
1817
with:
1918
image-tag: production
19+
oauth-redirect-url: 'https://template-fastapi-react.app.radix.equinor.com'
2020

2121
deploy-prod:
2222
needs: publish-production

0 commit comments

Comments
 (0)