generated from ministryofjustice/cloud-platform-terraform-template
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
updated build spec, added basic github action to test
- Loading branch information
1 parent
979ce73
commit f88c101
Showing
3 changed files
with
41 additions
and
4 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
on: | ||
push | ||
|
||
jobs: | ||
DhcpServerTesting: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
id-token: write | ||
contents: read | ||
steps: | ||
|
||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- 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 run | ||
make test |
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