diff --git a/.github/workflows/build-docker-push-to-ecr-production.yml b/.github/workflows/build-docker-push-to-ecr-production.yml index 96798f4..f4bab52 100644 --- a/.github/workflows/build-docker-push-to-ecr-production.yml +++ b/.github/workflows/build-docker-push-to-ecr-production.yml @@ -15,6 +15,13 @@ on: AWS_ROLE_NAME: required: true type: string + BUILD_ARGS: + required: false + type: string + BUILD_SECRETS: + required: false + type: string + description: "Docker build secret flags, e.g., --secret id=TOKEN1,env=SECRET1 --secret id=TOKEN2,env=SECRET2" DOCKERFILE_NAME: required: false type: string @@ -32,10 +39,6 @@ on: type: boolean default: true - secrets: - BUILD_ARG: - required: false - jobs: docker: runs-on: ubuntu-latest @@ -61,7 +64,7 @@ jobs: docker build -f ${{ inputs.DOCKERFILE_NAME }} \ -t ${{ inputs.REGISTRY_URL }}/${{ inputs.APPLICATION_NAME }}:$GITHUB_SHA \ ${{ inputs.BUILD_ARGS }} \ - ${{ secrets.BUILD_ARG }} \ + ${{ inputs.BUILD_SECRETS }} \ . docker push -a ${{ inputs.REGISTRY_URL }}/${{ inputs.APPLICATION_NAME }} - name: Retag and push container image diff --git a/.github/workflows/build-docker-push-to-ecr.yml b/.github/workflows/build-docker-push-to-ecr.yml index f308e38..09ca659 100644 --- a/.github/workflows/build-docker-push-to-ecr.yml +++ b/.github/workflows/build-docker-push-to-ecr.yml @@ -18,6 +18,10 @@ on: BUILD_ARGS: required: false type: string + BUILD_SECRETS: + required: false + type: string + description: "Docker build secret flags, e.g., --secret id=TOKEN1,env=SECRET1 --secret id=TOKEN2,env=SECRET2" DOCKERFILE_NAME: required: false type: string @@ -35,10 +39,6 @@ on: type: boolean default: true - secrets: - BUILD_ARG: - required: false - jobs: docker: runs-on: ubuntu-latest @@ -64,7 +64,7 @@ jobs: docker build -f ${{ inputs.DOCKERFILE_NAME }} \ -t ${{ inputs.REGISTRY_URL }}/${{ inputs.APPLICATION_NAME }}:$GITHUB_SHA \ ${{ inputs.BUILD_ARGS }} \ - ${{ secrets.BUILD_ARG }} \ + ${{ inputs.BUILD_SECRETS }} \ . docker push -a ${{ inputs.REGISTRY_URL }}/${{ inputs.APPLICATION_NAME }} - name: Retag and push container image