Skip to content

Commit

Permalink
ci: release to production on release created
Browse files Browse the repository at this point in the history
  • Loading branch information
eoaksnes committed Sep 7, 2022
1 parent f18518a commit b3e5e57
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 9 deletions.
16 changes: 14 additions & 2 deletions .github/workflows/release-please.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,25 @@
name: release-please

on:
push:
branches:
- main
name: release-please

jobs:
release-please:
runs-on: ubuntu-latest
steps:
- uses: google-github-actions/release-please-action@v3
id: release
with:
release-type: simple
package-name: release-please-action
package-name: release-please-action
outputs:
release_created: ${{ steps.release.outputs.release_created }}

deploy-prod:
needs: release-please
uses: ./.github/workflows/release-production.yaml
if: ${{ needs.release-please.outputs.release_created }}
secrets:
APP_SERVICE_ACCOUNT_TOKEN: ${{ secrets.APP_SERVICE_ACCOUNT_TOKEN }}
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
name: "Releases"

# This action works when creating a release
name: release-to-production

on:
workflow_dispatch:
release:
types:
- "released"
workflow_call:
secrets:
APP_SERVICE_ACCOUNT_TOKEN:
required: true

jobs:
tests:
uses: ./.github/workflows/tests.yaml

publish-production:
needs: tests
uses: ./.github/workflows/publish.yaml
with:
image-tag: production
oauth-redirect-url: 'https://template-fastapi-react.app.radix.equinor.com'

deploy-prod:
needs: publish-production
Expand Down

0 comments on commit b3e5e57

Please sign in to comment.