Support pulling ECR images by lambda functions #23
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Some of this logic was stolen from https://www.freecodecamp.org/news/a-lightweight-tool-agnostic-ci-cd-flow-with-github-actions/ | |
name: terraform | |
on: | |
push: | |
# branches: | |
# - master | |
pull_request: | |
jobs: | |
terraform: | |
name: terraform | |
runs-on: ubuntu-latest | |
steps: | |
- name: checkout | |
uses: actions/checkout@v2 | |
with: | |
fetch-depth: 1 | |
- name: terraform setup | |
uses: hashicorp/setup-terraform@v1 | |
# TODO: This step duplicates work done by the Makefile. | |
# - name: check terraform formatting | |
# id: fmt | |
# run: | | |
# terraform fmt -check -recursive | |
- name: run make | |
# env: | |
# TOKEN: ${{ secrets.TOKEN }} | |
run: | | |
make all | |
# - name: terraform init | |
# id: init | |
# run: terraform init | |
# | |
# - name: terraform plan | |
# id: plan | |
# if: github.event_name == 'pull_request' | |
# run: terraform plan -no-color | |
# continue-on-error: true | |
# | |
# - uses: actions/github-script@0.9.0 | |
# if: github.event_name == 'pull_request' | |
# env: | |
# PLAN: "terraform\n${{ steps.plan.outputs.stdout }}" | |
# with: | |
# github-token: ${{ secrets.GITHUB_TOKEN }} | |
# script: | | |
# const output = `#### Terraform Format and Style 🖌\`${{ steps.fmt.outcome }}\` | |
# #### Terraform Initialization ⚙️\`${{ steps.init.outcome }}\` | |
# #### Terraform Plan 📖\`${{ steps.plan.outcome }}\` | |
# | |
# <details><summary>Show Plan</summary> | |
# | |
# \`\`\`${process.env.PLAN}\`\`\` | |
# | |
# </details> | |
# | |
# *Pusher: @${{ github.actor }}, Action: \`${{ github.event_name }}\`*`; | |
# | |
# | |
# github.issues.createComment({ | |
# issue_number: context.issue.number, | |
# owner: context.repo.owner, | |
# repo: context.repo.repo, | |
# body: output | |
# }) | |
# | |
# - name: terraform plan status | |
# if: steps.plan.outcome == 'failure' | |
# run: exit 1 | |
# | |
# - name: terraform apply | |
# if: github.ref == 'refs/heads/master' && github.event_name == 'push' | |
# run: terraform apply -auto-approve |