From 8e5c19a70e9d6d897629440158bed51116037f88 Mon Sep 17 00:00:00 2001 From: Andre Narciso Date: Thu, 7 Jul 2022 09:54:55 +0100 Subject: [PATCH] build & push to the public ECR --- .github/workflows/public-ecr.yml | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 .github/workflows/public-ecr.yml diff --git a/.github/workflows/public-ecr.yml b/.github/workflows/public-ecr.yml new file mode 100644 index 0000000..3e66be3 --- /dev/null +++ b/.github/workflows/public-ecr.yml @@ -0,0 +1,29 @@ +# .github/workflows/public-ecr.yml +name: Build and Push OpenVPN +on: + push: + +permissions: + id-token: write + contents: write # This is required for actions/checkout@v1 +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: Git clone the repository + uses: actions/checkout@v1 + - name: configure aws credentials + uses: aws-actions/configure-aws-credentials@master + with: + role-to-assume: arn:aws:iam::${{ secrets.AWS_ACCOUNTID }}:role/github-openvpn + role-session-name: samplerolesession + aws-region: eu-west-1 + - name: Docker Login + run: aws ecr-public get-login-password --region us-east-1 | docker login --username AWS --password-stdin public.ecr.aws/y9x3p3i6 + - name: Docker Build + run: docker build -t roxprox-ratelimit . + - name: Docker Tag + run: docker tag roxprox-ratelimit public.ecr.aws/y9x3p3i6/roxprox-ratelimit:latest + - name: Docker Push + run: docker push public.ecr.aws/y9x3p3i6/roxprox-ratelimit +