Skip to content
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

Moklidia test account limit 2 #11

Open
wants to merge 16 commits into
base: main
Choose a base branch
from
27 changes: 21 additions & 6 deletions .github/workflows/call-docker-build-promote.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
contents: read
packages: write
pull-requests: write
uses: mostlydevops/actions/.github/workflows/reusable-docker-build.yaml@main
uses: UffizziCloud/MostlyDevOps-actions/.github/workflows/reusable-docker-build.yaml@main
with:
# DON'T login to or push to Docker Hub
dockerhub-enable: false
Expand All @@ -43,16 +43,31 @@ jobs:
needs: docker-build-pr
permissions:
packages: read
uses: mostlydevops/actions/.github/workflows/reusable-trivy-scan-image.yaml@main
uses: UffizziCloud/MostlyDevOps-actions/.github/workflows/reusable-trivy-scan-image.yaml@main
secrets:
registry-username: ${{ github.actor }}
registry-password: ${{ secrets.GITHUB_TOKEN }}
with:
image: 'ghcr.io/mostlydevops/wordsmith-api:${{ needs.docker-build-pr.outputs.image-tag }}'
image: 'ghcr.io/${{ github.repository }}:${{ needs.docker-build-pr.outputs.image-tag }}'
exit-code: 1
severity: HIGH,CRITICAL
ignore-unfixed: true

deploy-uffizzi:
name: Deploy to Uffizzi Test
if: github.event_name == 'pull_request'
needs: docker-build-pr
uses: UffizziCloud/MostlyDevOps-actions/.github/workflows/reusable-uffizzi.yaml@oidc
secrets:
github-token: ${{ secrets.GITOPS_WORDSMITH_K8S }}
uffizzi-password: ${{ secrets.UFFIZZI_PASSWORD }}
with:
repo: UffizziCloud/MostlyDevOps-wordsmith-k8s
environment-dir: uffizzi
image: ghcr.io/${{ github.repository }}
tag: ${{ needs.docker-build-pr.outputs.image-tag }}
pr-number: ${{ github.event.number }}

#### MERGE TO MAIN ####
docker-build-merge:
name: Call Build on Push
Expand All @@ -61,7 +76,7 @@ jobs:
contents: read
packages: write
pull-requests: write
uses: mostlydevops/actions/.github/workflows/reusable-docker-build.yaml@main
uses: UffizziCloud/MostlyDevOps-actions/.github/workflows/reusable-docker-build.yaml@main
with:
dockerhub-enable: false
ghcr-enable: true
Expand All @@ -79,11 +94,11 @@ jobs:
name: Call GitOps PR
if: github.event_name == 'push'
needs: docker-build-merge
uses: mostlydevops/actions/.github/workflows/reusable-gitops-pr.yaml@main
uses: UffizziCloud/MostlyDevOps-actions/.github/workflows/reusable-gitops-pr.yaml@main
secrets:
github-token: ${{ secrets.GITOPS_WORDSMITH_K8S }}
with:
repo: mostlydevops/wordsmith-k8s
repo: UffizziCloud/MostlyDevOps-k8s
environment-dir: production
image: ghcr.io/${{ github.repository }}-stable
tag: ${{ needs.docker-build-merge.outputs.image-tag }}
20 changes: 20 additions & 0 deletions .github/workflows/call-uffizzi-delete.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
name: Close Pull Request

on:
pull_request:
types: [closed]

concurrency:
group: ${{ github.ref }}-${{ github.workflow }}
cancel-in-progress: true

jobs:
delete-uffizzi:
name: Delete Uffizzi virtual cluster
uses: UffizziCloud/MostlyDevOps-actions/.github/workflows/reusable-uffizzi-delete.yaml@main
secrets:
github-token: ${{ secrets.GITOPS_WORDSMITH_K8S }}
uffizzi-password: ${{ secrets.UFFIZZI_PASSWORD }}
with:
pr-number: ${{ github.event.number }}