Skip to content

Test Container Push #61

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 9 commits into from
Oct 31, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions .github/workflows/_containerTemplate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,11 @@ jobs:
continue-on-error: false
environment: ${{ inputs.environment }}

permissions:
contents: read
packages: write
id-token: write

steps:
# Check Out Repository
- name: Check Out Repository
Expand Down Expand Up @@ -108,8 +113,7 @@ jobs:
id: sign
if: ${{ github.event_name != 'pull_request' }}
run: |
echo "${TAGS}" | xargs -I {} cosign sign --yes {}@${DIGEST}
cosign sign --yes "${TAGS}@${DIGEST}"
env:
# https://docs.github.com/en/actions/security-guides/security-hardening-for-github-actions#using-an-intermediate-environment-variable
TAGS: ${{ steps.metadata.outputs.tags }}
DIGEST: ${{ steps.build_push.outputs.digest }}
4 changes: 3 additions & 1 deletion .github/workflows/_functionAppDeployTemplate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,12 @@ jobs:
id: function_dependencies
shell: bash
run: |
pushd '${{ inputs.function_directory }}'
pushd "${FUNCTION_DIRECTORY}"
python -m pip install --upgrade pip
pip install -r requirements.txt --target=".python_packages/lib/site-packages"
popd
env:
FUNCTION_DIRECTORY: ${{ inputs.function_directory }}

# Login to Azure
- name: Azure Login
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/_functionAppTestTemplate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ jobs:
- name: Run Python Tests
id: python_test
run: |
pip install -r ${{ inputs.function_directory }}/requirements.txt -q
pip install -r "${FUNCTION_DIRECTORY}/requirements.txt" -q
pip install -r requirements.txt -q
pytest
env:
FUNCTION_DIRECTORY: ${{ inputs.function_directory }}
5 changes: 4 additions & 1 deletion .github/workflows/_terraformApplyTemplate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,4 +82,7 @@ jobs:
- name: Terraform Apply
working-directory: ${{ inputs.working_directory }}
run: |
terraform apply -var-file vars.${{ inputs.environment }}.tfvars -var='my_secret=${{ secrets.MY_SAMPLE_SECRET }}' -auto-approve -input=false
terraform apply -var-file="vars.${ENVIRONMENT}.tfvars" -var="my_secret=${MY_SAMPLE_SECRET}" -auto-approve -input=false
env:
ENVIRONMENT: ${{ inputs.environment }}
MY_SAMPLE_SECRET: ${{ secrets.MY_SAMPLE_SECRET }}
5 changes: 4 additions & 1 deletion .github/workflows/_terraformPlanTemplate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,10 @@ jobs:
id: terraform_plan
working-directory: ${{ inputs.working_directory }}
run: |
terraform plan -var-file vars.${{ inputs.environment }}.tfvars -var='my_secret=${{ secrets.MY_SAMPLE_SECRET }}' -input=false
terraform plan -var-file="vars.${ENVIRONMENT}.tfvars" -var="my_secret=${MY_SAMPLE_SECRET}" -input=false
env:
ENVIRONMENT: ${{ inputs.environment }}
MY_SAMPLE_SECRET: ${{ secrets.MY_SAMPLE_SECRET }}

# Add Pull Request Comment
- name: Add Pull Request Comment
Expand Down