generated from ministryofjustice/cloud-platform-terraform-template
-
Notifications
You must be signed in to change notification settings - Fork 3
49 lines (43 loc) · 1.63 KB
/
dhcp-testing.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
on:
push:
branches:
- main
pull_request:
jobs:
DhcpServerTesting:
runs-on: ubuntu-latest
permissions:
id-token: write
contents: read
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install Compose
uses: ndeloof/[email protected]
with:
version: v2.1.0 # defaults to 'latest'
legacy: true # will also install in PATH as `docker-compose`
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v4
with:
aws-region: eu-west-2
role-to-assume: arn:aws:iam::683290208331:role/GitHubWorkflow
role-session-name: GitHubWorkflow
- name: Get AWS DockerHub credentials
id: docker_hub_credentials
run: |
username=$(aws ssm get-parameter --name /moj-network-access-control/docker/username --with-decryption --query "Parameter.Value" --output text)
echo "::add-mask::$username"
echo "docker-hub-username=$username" >> "$GITHUB_OUTPUT"
password=$(aws ssm get-parameter --name /moj-network-access-control/docker/password --with-decryption --query "Parameter.Value" --output text)
echo "::add-mask::$password"
echo "docker-hub-password=$password" >> "$GITHUB_OUTPUT"
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{steps.docker_hub_credentials.outputs.docker-hub-username}}
password: ${{steps.docker_hub_credentials.outputs.docker-hub-password}}
- name: Run DHCP tests
run: |
make build-dev
make test