Skip to content

Commit 2de6267

Browse files
authored
Merge pull request #61 from PerfectThymeTech/marvinbuss/container_002
Test Container Push
2 parents 3b1874e + ab6def6 commit 2de6267

File tree

5 files changed

+20
-6
lines changed

5 files changed

+20
-6
lines changed

.github/workflows/_containerTemplate.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,11 @@ jobs:
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 }}

.github/workflows/_functionAppDeployTemplate.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff 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

.github/workflows/_functionAppTestTemplate.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,8 @@ jobs:
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 }}

.github/workflows/_terraformApplyTemplate.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,4 +82,7 @@ jobs:
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 }}

.github/workflows/_terraformPlanTemplate.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,10 @@ jobs:
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

0 commit comments

Comments
 (0)