-
Notifications
You must be signed in to change notification settings - Fork 47
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* New GHA deployment for google cloud CDNs
- Loading branch information
Showing
4 changed files
with
80 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# Ignore all files by default | ||
* | ||
!/apps.yml | ||
!images/ | ||
!images/*.png |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
name: Deploy | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
environment: | ||
required: true | ||
type: string | ||
|
||
env: | ||
BUCKET_NAME: sso-dashboard-${{ inputs.environment }} | ||
|
||
jobs: | ||
deployment: | ||
name: Deploy to Google CDN | ||
environment: ${{ inputs.environment }} | ||
permissions: | ||
contents: 'read' | ||
id-token: 'write' | ||
|
||
runs-on: ubuntu-latest | ||
steps: | ||
- name: 'Checkout' | ||
uses: 'actions/checkout@v3' | ||
|
||
- name: 'Google auth' | ||
id: 'auth' | ||
uses: 'google-github-actions/auth@v1' | ||
with: | ||
workload_identity_provider: '${{ secrets.WIF_PROVIDER }}' | ||
service_account: '${{ secrets.WIF_SERVICE_ACCOUNT }}' | ||
|
||
- name: 'Upload to CDN bucket' | ||
id: 'upload-to-bucket' | ||
uses: 'google-github-actions/upload-cloud-storage@v1' | ||
with: | ||
path: './' | ||
destination: '${{ env.BUCKET_NAME }}' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
name: Main workflow | ||
|
||
on: | ||
push: | ||
release: | ||
types: [published] | ||
workflow_dispatch: | ||
|
||
jobs: | ||
call-test-configuration: | ||
name: Test Dashboard Configuration | ||
uses: ./.github/workflows/tests.yaml | ||
|
||
call-deploy-configuration-to-dev: | ||
name: Deploy to Development | ||
if: github.event_name == 'push' && github.ref_name == 'master' | ||
needs: call-test-configuration | ||
uses: ./.github/workflows/google-deploy.yaml | ||
with: | ||
environment: development | ||
secrets: inherit | ||
|
||
call-deploy-configuration-to-prod: | ||
name: Deploy to Production | ||
if: github.event_name == 'release' | ||
needs: call-test-configuration | ||
uses: ./.github/workflows/google-deploy.yaml | ||
with: | ||
environment: production | ||
secrets: inherit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters