Skip to content

Update usage of checkout action to v4 #573

Update usage of checkout action to v4

Update usage of checkout action to v4 #573

Workflow file for this run

name: Test SSH Keys
on:
- pull_request
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
jobs:
ssh_key:
runs-on: ubuntu-latest
name: Git module source
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Plan
uses: ./terraform-plan
env:
TERRAFORM_SSH_KEY: ${{ secrets.TERRAFORM_SSH_KEY }}
with:
path: tests/workflows/test-ssh
label: test-ssh ssh_key
- name: Apply
uses: ./terraform-apply
id: output
env:
TERRAFORM_SSH_KEY: ${{ secrets.TERRAFORM_SSH_KEY }}
with:
path: tests/workflows/test-ssh
label: test-ssh ssh_key
- name: Verify outputs
run: |
if [[ "${{ steps.output.outputs.word }}" != "hello" ]]; then
echo "::error:: output not set correctly"
exit 1
fi
no_ssh_key:
runs-on: ubuntu-latest
name: Git module source with no key
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Plan
uses: ./terraform-plan
continue-on-error: true
id: plan
with:
path: tests/workflows/test-ssh
label: test-ssh no_ssh_key
add_github_comment: false
- name: Check failed
run: |
if [[ "${{ steps.plan.outcome }}" != "failure" ]]; then
echo "did not fail correctly with no SSH key"
exit 1
fi