Skip to content

Commit

Permalink
fix(ci): adding in a paramaterized download for archive
Browse files Browse the repository at this point in the history
  • Loading branch information
bassrock committed Aug 20, 2024
1 parent 407c260 commit a71d77d
Showing 1 changed file with 27 additions and 4 deletions.
31 changes: 27 additions & 4 deletions .github/workflows/reuse-build-and-push-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,12 @@ on:
description: 'The terraform output which is used to get the ECS_Service and Task Defintion arns for codedeploy'
required: false
type: string

archive-download-name:
description: 'If specified, download this archive instead of checkout'
required: false
type: string
default: ''

permissions:
contents: read # This is required for actions/checkout
id-token: write # Access the Github JWT for AWS access
Expand All @@ -62,7 +67,13 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
if: inputs.archive-download-name == ''
uses: actions/checkout@v4
- name: Archive download
if: inputs.archive-download-name != ''
uses: actions/download-artifact@v4
with:
name: ${{inputs.archive-download-name}}
- name: Build Docker Image
uses: ./.github/actions/containerize
with:
Expand All @@ -83,7 +94,13 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
if: inputs.archive-download-name == ''
uses: actions/checkout@v4
- name: Archive download
if: inputs.archive-download-name != ''
uses: actions/download-artifact@v4
with:
name: ${{inputs.archive-download-name}}
# Get the AWS credentials
- name: AWS Credentials
uses: aws-actions/configure-aws-credentials@v4
Expand Down Expand Up @@ -119,7 +136,13 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
if: inputs.archive-download-name == ''
uses: actions/checkout@v4
- name: Archive download
if: inputs.archive-download-name != ''
uses: actions/download-artifact@v4
with:
name: ${{inputs.archive-download-name}}
# Get the AWS credentials
- name: AWS Credentials
uses: aws-actions/configure-aws-credentials@v4
Expand Down

0 comments on commit a71d77d

Please sign in to comment.