File tree Expand file tree Collapse file tree 5 files changed +20
-6
lines changed Expand file tree Collapse file tree 5 files changed +20
-6
lines changed Original file line number Diff line number Diff line change 4141 continue-on-error : false
4242 environment : ${{ inputs.environment }}
4343
44+ permissions :
45+ contents : read
46+ packages : write
47+ id-token : write
48+
4449 steps :
4550 # Check Out Repository
4651 - name : Check Out Repository
@@ -108,8 +113,7 @@ jobs:
108113 id : sign
109114 if : ${{ github.event_name != 'pull_request' }}
110115 run : |
111- echo "${TAGS}" | xargs -I {} cosign sign --yes { }@${DIGEST}
116+ cosign sign --yes "${TAGS }@${DIGEST}"
112117 env :
113- # https://docs.github.com/en/actions/security-guides/security-hardening-for-github-actions#using-an-intermediate-environment-variable
114118 TAGS : ${{ steps.metadata.outputs.tags }}
115119 DIGEST : ${{ steps.build_push.outputs.digest }}
Original file line number Diff line number Diff line change @@ -63,10 +63,12 @@ jobs:
6363 id : function_dependencies
6464 shell : bash
6565 run : |
66- pushd '${{ inputs.function_directory }}'
66+ pushd "${FUNCTION_DIRECTORY}"
6767 python -m pip install --upgrade pip
6868 pip install -r requirements.txt --target=".python_packages/lib/site-packages"
6969 popd
70+ env :
71+ FUNCTION_DIRECTORY : ${{ inputs.function_directory }}
7072
7173 # Login to Azure
7274 - name : Azure Login
Original file line number Diff line number Diff line change 4040 - name : Run Python Tests
4141 id : python_test
4242 run : |
43- pip install -r ${{ inputs.function_directory }} /requirements.txt -q
43+ pip install -r "${FUNCTION_DIRECTORY} /requirements.txt" -q
4444 pip install -r requirements.txt -q
4545 pytest
46+ env :
47+ FUNCTION_DIRECTORY : ${{ inputs.function_directory }}
Original file line number Diff line number Diff line change 8282 - name : Terraform Apply
8383 working-directory : ${{ inputs.working_directory }}
8484 run : |
85- terraform apply -var-file vars.${{ inputs.environment }}.tfvars -var='my_secret=${{ secrets.MY_SAMPLE_SECRET }}' -auto-approve -input=false
85+ terraform apply -var-file="vars.${ENVIRONMENT}.tfvars" -var="my_secret=${MY_SAMPLE_SECRET}" -auto-approve -input=false
86+ env :
87+ ENVIRONMENT : ${{ inputs.environment }}
88+ MY_SAMPLE_SECRET : ${{ secrets.MY_SAMPLE_SECRET }}
Original file line number Diff line number Diff line change 9292 id : terraform_plan
9393 working-directory : ${{ inputs.working_directory }}
9494 run : |
95- terraform plan -var-file vars.${{ inputs.environment }}.tfvars -var='my_secret=${{ secrets.MY_SAMPLE_SECRET }}' -input=false
95+ terraform plan -var-file="vars.${ENVIRONMENT}.tfvars" -var="my_secret=${MY_SAMPLE_SECRET}" -input=false
96+ env :
97+ ENVIRONMENT : ${{ inputs.environment }}
98+ MY_SAMPLE_SECRET : ${{ secrets.MY_SAMPLE_SECRET }}
9699
97100 # Add Pull Request Comment
98101 - name : Add Pull Request Comment
You can’t perform that action at this time.
0 commit comments