Skip to content

Refactor CI/CD workflow to improve structure and organization of container build and publish job #35

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 3 commits into from
Apr 21, 2025
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
4 changes: 4 additions & 0 deletions .github/secret_scanning.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
paths-ignore:
- "docs/**"
- "README.md"
- "**/README.md"
20 changes: 11 additions & 9 deletions .github/workflows/cicd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ on:
- main

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

Expand All @@ -18,9 +19,7 @@ env:
jobs:
cicd:
name: Build and Deploy to Azure Web App

runs-on: ubuntu-latest

steps:
# Checkout the repo
- uses: actions/checkout@v4
Expand Down Expand Up @@ -71,10 +70,13 @@ jobs:
- name: logout
run: |
az logout

- uses: advanced-security/reusable-workflows/.github/workflows/container.yml@v0.2.0
continue-on-error: true
with:
# This is used for tagging the container image
version: v1.0.0
container-file: ./src/webapp01/Dockerfile

# https://docs.github.com/en/actions/security-for-github-actions/using-artifact-attestations/using-artifact-attestations-and-reusable-workflows-to-achieve-slsa-v1-build-level-3
container-build-publish:
name: Build and Publish Container Image
needs: []
uses: advanced-security/reusable-workflows/.github/workflows/container.yml@v0.2.0
with:
# This is used for tagging the container image
version: v1.0.0
container-file: ./src/webapp01/Dockerfile
Loading