Skip to content

Commit b36e538

Browse files
authored
Merge pull request #24 from YilingCAI/feature/cai
add dev env in workflow
2 parents c4b5fc0 + 1654441 commit b36e538

2 files changed

Lines changed: 18 additions & 0 deletions

File tree

.github/workflows/cd-ec2-ansible.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,9 @@ jobs:
5454
manual-build:
5555
name: "Build & Push [manual:${{ inputs.environment }}]"
5656
if: github.event_name == 'workflow_dispatch' && inputs.operation == 'deploy'
57+
permissions:
58+
contents: read
59+
id-token: write
5760
uses: ./.github/workflows/_build-and-push.yml
5861
with:
5962
git-ref: ${{ github.sha }}
@@ -151,6 +154,9 @@ jobs:
151154
auto-build-staging:
152155
name: "Auto Build & Push [staging]"
153156
if: github.event_name == 'workflow_run' && github.event.workflow_run.conclusion == 'success'
157+
permissions:
158+
contents: read
159+
id-token: write
154160
uses: ./.github/workflows/_build-and-push.yml
155161
with:
156162
git-ref: ${{ github.event.workflow_run.head_sha }}
@@ -246,6 +252,9 @@ jobs:
246252
auto-build-production:
247253
name: "Auto Build & Push [production]"
248254
if: startsWith(github.ref, 'refs/tags/v')
255+
permissions:
256+
contents: read
257+
id-token: write
249258
uses: ./.github/workflows/_build-and-push.yml
250259
with:
251260
git-ref: ${{ github.ref }}

.github/workflows/cd-ecs-fargate.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,9 @@ jobs:
4545
manual-build:
4646
name: "Build & Push [manual:${{ inputs.environment }}]"
4747
if: github.event_name == 'workflow_dispatch'
48+
permissions:
49+
contents: read
50+
id-token: write
4851
uses: ./.github/workflows/_build-and-push.yml
4952
with:
5053
git-ref: ${{ github.sha }}
@@ -150,6 +153,9 @@ jobs:
150153
github.event_name == 'workflow_run'
151154
&& github.event.workflow_run.conclusion == 'success'
152155
&& github.event.workflow_run.head_branch == 'develop'
156+
permissions:
157+
contents: read
158+
id-token: write
153159
uses: ./.github/workflows/_build-and-push.yml
154160
with:
155161
git-ref: ${{ github.event.workflow_run.head_sha }}
@@ -285,6 +291,9 @@ jobs:
285291
auto-build-production:
286292
name: "Auto Build & Push [production]"
287293
if: startsWith(github.ref, 'refs/tags/v')
294+
permissions:
295+
contents: read
296+
id-token: write
288297
uses: ./.github/workflows/_build-and-push.yml
289298
with:
290299
git-ref: ${{ github.ref }}

0 commit comments

Comments
 (0)