-
Notifications
You must be signed in to change notification settings - Fork 30
44 lines (36 loc) · 1.13 KB
/
UploadDockerImage.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
# Pushes Docker images created from the deploy tool's Dockerfile templates to an internal ECR so that they can be scanned for security vulnerabilities.
name: Upload Docker Images
on:
# Manually trigger on specific branches
workflow_dispatch:
push:
branches:
- main
permissions:
id-token: write
jobs:
upload-docker-images:
runs-on: ubuntu-latest
steps:
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@8c3f20df09ac63af7b3ae3d7c91f105f857d8497 #v4
with:
aws-region: us-west-2
role-to-assume: ${{ secrets.DOCKER_IMAGE_UPLOADER_ROLE }}
role-duration-seconds: 1800
- name: Checkout Repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup .NET Core 6.0
uses: actions/setup-dotnet@v3
with:
dotnet-version: 6.0.x
- name: Restore dependencies
run: dotnet restore
- name: Build
run: dotnet build --no-restore
- name: Run Docker Image Uploader
run: |
cd ./test/AWS.Deploy.DockerImageUploader
dotnet run --project ./AWS.Deploy.DockerImageUploader.csproj