Skip to content

Commit

Permalink
more test workflaow
Browse files Browse the repository at this point in the history
  • Loading branch information
jarrod-lowe committed Aug 10, 2024
1 parent c10a13a commit 7df8622
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 3 deletions.
41 changes: 41 additions & 0 deletions .github/workflows/environment-main-deploy.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Environment Main - Apply

on:
push:
branches:
- main

permissions:
id-token: write
contents: read
pull-requests: write

jobs:
envtest:
name: Environment Main - Apply
runs-on: ubuntu-latest
environment: main
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- name: Checkout code
uses: actions/checkout@9a9194f87191a7e9055e3e9b95b8cfb13023bb08
- name: Configure AWS Access
uses: aws-actions/configure-aws-credentials@67fbcbb121271f7775d2e7715933280b06314838
with:
role-to-assume: arn:aws:iam::${{ vars.AWS_ACCOUNT }}:role/GitHubAction-Wildsea@${{ vars.ENVIRONMENT }}
role-session-name: GitHubTest
aws-region: ${{ vars.AWS_REGION }}
- name: terraform plan
uses: dflook/terraform-apply

Check warning on line 30 in .github/workflows/environment-main-deploy.yaml

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

.github/workflows/environment-main-deploy.yaml#L30

An action sourced from a third-party repository on GitHub is not pinned to a full length commit SHA. Pinning an action to a full length commit SHA is currently the only way to use an action as an immutable release.
with:
path: terraform/environment/github
variables: |
aws_account="${{ vars.AWS_ACCOUNT }}"
aws_region="${{ vars.AWS_REGION }}"
state_bucket="${{ vars.STATE_BUCKET }}"
environment="${{ vars.ENVIRONMENT }}"
backend_config:
bucket=${{ vars.STATE_BUCKET }}
key=${{ vars.ENVIRONMENT }}/terraform.tfstate
region=${{ vars.AWS_REGION }}
3 changes: 0 additions & 3 deletions .github/workflows/environment-main-plan.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@ name: Environment Main - Plan

on:
pull_request: {}
push:
branches:
- main

permissions:
id-token: write
Expand Down

0 comments on commit 7df8622

Please sign in to comment.