Skip to content

Commit

Permalink
CCM-5100: Add action to upload terraform artifact
Browse files Browse the repository at this point in the history
  • Loading branch information
m-houston committed Jul 2, 2024
1 parent 74cd6a6 commit 3447ab6
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 12 deletions.
21 changes: 21 additions & 0 deletions .github/actions/package-terraform/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: "Package Terraform"
description: "Validate and package terraform configuration as an artifact"
inputs:
version:
description: "Version number"
required: true
runs:
using: "composite"
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Validate
shell: bash
run: echo TODO Validate Terraform

- name: Upload artifact
uses: actions/actions/upload-artifact@v4
with:
path: "infrastructure"
name: iam-infrastructure-${{ inputs.version }}
19 changes: 7 additions & 12 deletions .github/workflows/stage-3-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,23 +44,18 @@ jobs:
uses: ./.github/actions/build-docs
with:
version: "${{ inputs.version }}"
artefact-1:
name: "Artefact 1"
artefact-terraform:
name: "Package Terraform"
runs-on: ubuntu-latest
timeout-minutes: 3
steps:
- name: "Checkout code"
uses: actions/checkout@v4
- name: "Build artefact 1"
run: |
echo "Building artefact 1 ..."
- name: "Check artefact 1"
run: |
echo "Checking artefact 1 ..."
- name: "Upload artefact 1"
run: |
echo "Uploading artefact 1 ..."
# TODO: Use either action/cache or action/upload-artifact

- name: "Upload artifact"
uses: ./.github/actions/package-terraform
with:
version: "${{ inputs.version }}"
artefact-n:
name: "Artefact n"
runs-on: ubuntu-latest
Expand Down

0 comments on commit 3447ab6

Please sign in to comment.