forked from kepuss/IATD-DevSecOps
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
22 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,17 +6,30 @@ jobs: | |
deploy: | ||
runs-on: ubuntu-latest | ||
steps: | ||
|
||
- name: Install Cosign | ||
uses: sigstore/[email protected] | ||
- uses: azure/login@v1 | ||
with: | ||
creds: ${{ secrets.AZURE_CREDENTIALS }} | ||
|
||
- name: Deploy Container App | ||
uses: azure/container-apps-deploy-action@v1 | ||
with: | ||
imageToDeploy: ${{ secrets.DOCKERHUB_USERNAME }}/devops-labs:latest | ||
containerAppName: devops-app | ||
containerAppEnvironment: devops-app-env | ||
resourceGroup: devsecops-lab | ||
location: australiaeast | ||
targetPort: 5000 | ||
|
||
- name: Install Cosign | ||
uses: sigstore/[email protected] | ||
|
||
- name: Verify image signature | ||
env: | ||
- name: Verify image signature | ||
env: | ||
IMAGE: ${{ secrets.DOCKERHUB_USERNAME }}/devops-labs:latest | ||
GITHUB_ISSUER: https://token.actions.githubusercontent.com | ||
# CERT_IDENTITY_REGEXP: https://github.com/.*/devsecops-lab-app/.github/workflows/ci-pipeline.yml.* | ||
CERT_IDENTITY_REGEXP: https://github.com/.*/IATD-DevSecOps/.github/workflows/ci-pipeline.yml.* | ||
run: | | ||
run: | | ||
cosign verify $IMAGE --certificate-identity-regexp $CERT_IDENTITY_REGEXP --certificate-oidc-issuer $GITHUB_ISSUER | ||
submit_results: | ||
|
@@ -28,6 +41,9 @@ jobs: | |
with: | ||
creds: ${{ secrets.AZURE_CREDENTIALS }} | ||
|
||
- name: Install jq | ||
run: sudo apt-get install jq | ||
|
||
- name: Azure CLI script | ||
id: token-gen | ||
uses: azure/CLI@v1 | ||
|