File tree Expand file tree Collapse file tree 4 files changed +12
-20
lines changed
Expand file tree Collapse file tree 4 files changed +12
-20
lines changed Original file line number Diff line number Diff line change @@ -22,7 +22,12 @@ permissions:
2222 id-token : write
2323
2424jobs :
25+ generate-version :
26+ uses : 0xPolygon/pipelines/.github/workflows/generate_version.yaml@main
27+
2528 build_and_deploy :
29+ needs :
30+ - generate-version
2631 runs-on : ubuntu-latest
2732 environment : ${{ inputs.environment }}
2833 permissions :
6873 uses : docker/metadata-action@v5
6974 with :
7075 images : ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
71- tags : |
72- type=ref,event=branch
73- type=ref,event=pr
74- type=semver,pattern={{version}}
75- type=semver,pattern={{major}}.{{minor}}
76+ tags : ${{ needs.generate-version.outputs.version }}
7677 flavor : |
7778 latest=false
7879
Original file line number Diff line number Diff line change 77 branches :
88 - dev
99 - main
10- workflow_dispatch :
11- inputs :
12- environment :
13- required : false
14- type : choice
15- description : " Select the environment to deploy to (only required for production deployment)"
16- options :
17- - staging
18- - prod
1910
2011jobs :
2112 deploy :
2213 if : |
2314 (github.event_name == 'pull_request' && startsWith(github.head_ref, 'hosted/')) ||
2415 (github.event_name == 'push' && github.ref == 'refs/heads/dev') ||
25- (github.event_name == 'push' && github.ref == 'refs/heads/main') ||
26- (github.event_name == 'workflow_dispatch' && inputs.environment == 'prod')
16+ (github.event_name == 'push' && github.ref == 'refs/heads/main')
2717 uses : ./.github/workflows/build_and_deploy_gcp.yml
2818 with :
29- environment : ${{ inputs.environment ||
30- (github.ref == 'refs/heads/dev' && 'dev') ||
19+ environment : ${{(github.ref == 'refs/heads/dev' && 'dev') ||
3120 (github.ref == 'refs/heads/main' && 'staging') ||
32- (github.event_name == 'pull_request' && 'dev') ||
33- ' dev' }}
21+ (github.event_name == 'pull_request' && 'dev')}}
22+ core_app : ${{ github.ref == 'refs/heads/main' && 'polygon-docs-main' || 'polygon-docs- dev' }}
3423 secrets : inherit
Original file line number Diff line number Diff line change 1+ Subproject commit 3a58f283186885fabea877fe381fac8699c7d138
Original file line number Diff line number Diff line change 1+ Subproject commit dc6f275d7b4a5af064b7a725ad2c55c244eaebca
You can’t perform that action at this time.
0 commit comments