Skip to content

Commit

Permalink
Merge pull request #20 from arup-group/add-input-param-to-s3-upload-a…
Browse files Browse the repository at this point in the history
…ction

Add an optional image-tag input param to the S3 upload action
  • Loading branch information
mfitz authored May 24, 2024
2 parents 1344706 + ee37827 commit b7e1e03
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
17 changes: 16 additions & 1 deletion .github/workflows/aws-upload.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,16 @@ on:
required: true
AWS_S3_CODE_BUCKET:
required: true
inputs:
image-tag:
description: >
An optional value to write into an image_tags file
before zipping and uploading the repo contents. The
image_tags file is used in some downstream Docker image
builds to tag the image with arbitrary values.
required: false
type: string
default: 'no-tags'

jobs:
upload-to-aws:
Expand All @@ -26,9 +36,14 @@ jobs:
release_name=`echo ${{ github.actor }}-${{ github.ref_name }}`
echo "Release name: $release_name"
echo $release_name > release_name
- name: Add optional image tags
if: inputs.image-tag != 'no-tags'
run: |
echo "Making an image_tags file with tag value: ${{ inputs.image-tag }}"
echo ${{ inputs.image-tag }} > image_tags
- name: Zip release
run: |
echo ${{ github.sha }} > release
zip -r app.zip .
- name: Push zip to S3
run: aws s3 cp app.zip "s3://${{ secrets.AWS_S3_CODE_BUCKET }}/${{ github.event.repository.name }}.zip"
run: aws s3 cp app.zip "s3://${{ secrets.AWS_S3_CODE_BUCKET }}/${{ github.event.repository.name }}.zip"
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Check whether project and parent template have diverged

- GitHub Action to validate the reusable workflows themselves
- Optional `image-tags` input parameter added to the AWS Upload workflow ([#19](https://github.com/arup-group/actions-city-modelling-lab/issues/19))

### Changed

Expand Down

0 comments on commit b7e1e03

Please sign in to comment.