diff --git a/.github/workflows/artifacts.yaml b/.github/workflows/artifacts.yaml index 3cf9805..e6b995c 100644 --- a/.github/workflows/artifacts.yaml +++ b/.github/workflows/artifacts.yaml @@ -72,6 +72,7 @@ jobs: syft-version: v0.76.1 - name: Configure AWS credentials + if: inputs.publish uses: aws-actions/configure-aws-credentials@v4 with: role-to-assume: ${{ vars.AWS_ECR_IAM_ROLE }} @@ -79,6 +80,7 @@ jobs: - name: Login to Amazon ECR id: login-ecr + if: inputs.publish uses: aws-actions/amazon-ecr-login@v2 - name: Set image name @@ -233,6 +235,7 @@ jobs: syft-version: v0.76.1 - name: Configure AWS credentials + if: inputs.publish uses: aws-actions/configure-aws-credentials@v4 with: role-to-assume: ${{ vars.AWS_ECR_IAM_ROLE }} @@ -240,6 +243,7 @@ jobs: - name: Login to Amazon ECR id: login-ecr + if: inputs.publish uses: aws-actions/amazon-ecr-login@v2 - name: Set image name diff --git a/.github/workflows/helm.yml b/.github/workflows/helm.yml index ddfad97..f6f7f79 100644 --- a/.github/workflows/helm.yml +++ b/.github/workflows/helm.yml @@ -29,6 +29,7 @@ jobs: version: ${{ env.HELM_VERSION }} - name: Configure AWS credentials + if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/deploy/charts/v') uses: aws-actions/configure-aws-credentials@v4 with: role-to-assume: ${{ vars.AWS_ECR_IAM_ROLE }} @@ -36,6 +37,7 @@ jobs: - name: Login to Amazon ECR id: login-ecr + if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/deploy/charts/v') uses: aws-actions/amazon-ecr-login@v2 - name: Add Helm repositories