Skip to content

Bump twig/twig from 3.10.3 to 3.14.0 in /service-front/app #15

Bump twig/twig from 3.10.3 to 3.14.0 in /service-front/app

Bump twig/twig from 3.10.3 to 3.14.0 in /service-front/app #15

name: "[Workflow] Destroy ephemeral environment"
permissions:
contents: read
security-events: none
pull-requests: read
actions: none
checks: none
deployments: none
issues: none
packages: none
repository-projects: none
statuses: none
defaults:
run:
shell: bash
on:
pull_request:
branches:
- main
types:
- closed
paths:
- "service-*/**"
- "terraform/**"
- "scripts/**"
- ".github/workflows/**"
jobs:
workspace_name:
uses: ministryofjustice/opg-github-workflows/.github/workflows/data-parse-workspace.yml@383650d409aad063a69ce6cc3a013ac538cc1508
if: github.event.pull_request.merged == true
cleanup_workspace:
if: github.event.pull_request.merged == true
runs-on: ubuntu-latest
needs:
- workspace_name
steps:
- name: Checkout
uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0
- name: Set terraform version
id: set-terraform-version
uses: ministryofjustice/opg-github-actions/.github/actions/[email protected]
with:
terraform_directory: "./terraform/environment"
- uses: hashicorp/setup-terraform@633666f66e0061ca3b725c73b2ec20cd13a8fdd1 # tag=v2.0.3
with:
terraform_version: ${{ steps.set-terraform-version.outputs.version }}
terraform_wrapper: false
- uses: webfactory/ssh-agent@dc588b651fe13675774614f8e6a936a468676387 # v0.9.0
with:
ssh-private-key: ${{ secrets.USE_AN_LPA_DEPLOY_KEY_PRIVATE_KEY }}
- name: configure AWS credentials for getting pagerduty token
uses: aws-actions/configure-aws-credentials@a78e788c51463a506fbaaec784bab37f73afb4e8 # [email protected]
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID_ACTIONS }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY_ACTIONS }}
role-to-assume: arn:aws:iam::367815980639:role/opg-use-an-lpa-ci
aws-region: eu-west-1
role-duration-seconds: 1800
role-session-name: OPGUseAnLPADevAssumeGithubAction
- name: set pagerduty token
run: |
export TF_VAR_pagerduty_token=$(aws secretsmanager get-secret-value --secret-id \
pagerduty_api_key --region eu-west-1 | jq -r '.SecretString' 2>/dev/null)
echo "::add-mask::$TF_VAR_pagerduty_token"
echo TF_VAR_pagerduty_token=$TF_VAR_pagerduty_token >> $GITHUB_ENV
- name: configure AWS credentials for terraform
uses: aws-actions/configure-aws-credentials@a78e788c51463a506fbaaec784bab37f73afb4e8 # [email protected]
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID_ACTIONS }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY_ACTIONS }}
aws-region: eu-west-1
role-duration-seconds: 3600
role-session-name: OPGUseAnLPATerraformGithubAction
- name: Run workspace cleanup
working-directory: ./terraform/environment
env:
TF_VAR_pagerduty_token: ${{ env.TF_VAR_pagerduty_token }}
run: |
../../scripts/pipeline/workspace_cleanup/destroy_workspace.sh ${{ needs.workspace_name.outputs.name }}