Skip to content

Commit

Permalink
chore: specify checkout branch
Browse files Browse the repository at this point in the history
  • Loading branch information
tshuli committed Sep 25, 2023
1 parent f4078d5 commit ec6aefd
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 7 deletions.
13 changes: 6 additions & 7 deletions .github/workflows/aws-deploy-scanner.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ on:
description: 'Provisioned concurrency'
required: true
type: number
checkoutBranch:
description: 'Branch to checkout code from'
required: true
type: string

permissions:
id-token: write
Expand All @@ -22,15 +26,10 @@ jobs:
runs-on: ubuntu-latest

steps:
- name: Checkout source code from specified branch if it is a scheduled run
- name: Checkout source code from specified checkout branch
uses: actions/checkout@v3
if: ${{ github.event_name == 'schedule' }}
with:
ref: ${{ inputs.environment }}

- name: Checkout source code
uses: actions/checkout@v3
if: ${{ github.event_name != 'schedule' }}
ref: ${{ inputs.checkoutBranch }}

- name: Setup Node.js
uses: actions/setup-node@v3
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/deploy-virus-scanner-production.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,5 @@ jobs:
with:
environment: 'production'
provisionedConcurrency: 5
checkoutBranch: 'release-al2'
secrets: inherit
1 change: 1 addition & 0 deletions .github/workflows/deploy-virus-scanner-staging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,5 @@ jobs:
with:
environment: 'staging'
provisionedConcurrency: 1
checkoutBranch: 'staging'
secrets: inherit
1 change: 1 addition & 0 deletions .github/workflows/deploy-virus-scanner-uat.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,5 @@ jobs:
with:
environment: 'uat'
provisionedConcurrency: 1
checkoutBranch: 'uat'
secrets: inherit

0 comments on commit ec6aefd

Please sign in to comment.