From f1fd62efafdac9d0607568ef4dc20be35bb39812 Mon Sep 17 00:00:00 2001 From: Ben Larabie Date: Tue, 5 Mar 2024 15:07:04 -0500 Subject: [PATCH] workflow rework --- .github/workflows/docker.yaml | 25 +++++++++++++++---------- 1 file changed, 15 insertions(+), 10 deletions(-) diff --git a/.github/workflows/docker.yaml b/.github/workflows/docker.yaml index 0b4caacc33..1cec8c0fb5 100644 --- a/.github/workflows/docker.yaml +++ b/.github/workflows/docker.yaml @@ -1,15 +1,21 @@ -name: Staging - Helmfile Diff - -on: - - pull_request +name: Build, push to AWS ECR, and deploy +on: + pull_request: + branches: + - main env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - HELMFILE_FILE_PATH: ${{ github.workspace }}/helmfile - STAGING_AWS_ACCOUNT: ${{ secrets.STAGING_AWS_ACCOUNT }} + AWS_REGION: ca-central-1 + DOCKER_ORG: public.ecr.aws/v6b8u5o6 + DOCKER_SLUG: public.ecr.aws/v6b8u5o6/notify-api + KUBECTL_VERSION: '1.23.6' + +permissions: + id-token: write # This is required for requesting the OIDC JWT + contents: read # This is required for actions/checkout jobs: - helmfile-diff: + deploy: runs-on: github-arc-ss-api-dev steps: - name: Configure AWS credentials @@ -31,5 +37,4 @@ jobs: install-helm: yes - name: Configure kubeconfig run: | - aws eks update-kubeconfig --name notification-canada-ca-staging-eks-cluster - kubectl config rename-context arn:aws:eks:ca-central-1:$STAGING_AWS_ACCOUNT:cluster/notification-canada-ca-staging-eks-cluster staging \ No newline at end of file + aws eks update-kubeconfig --name notification-canada-ca-staging-eks-cluster \ No newline at end of file