Skip to content

Commit

Permalink
refactor: update build-test-deploy workflow and add delete env workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
radnov committed Jul 13, 2023
1 parent 8d00ae8 commit 6bf2455
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Tests, build and deploy
name: Build, test and deploy

on:
push:
Expand All @@ -8,6 +8,7 @@ on:
- v*.*.*

pull_request:
types: [opened, reopened, synchronize, labeled]

workflow_dispatch:

Expand All @@ -19,8 +20,7 @@ concurrency:
jobs:
call-workflow:
# TODO update the branch reference before merging the PR
uses: dhis2-sre/gha-workflows/.github/workflows/instance-manager.yaml@DEVOPS-262
if: ${{ (github.event_name == 'pull_request' && startsWith(github.head_ref, 'feature/')) || github.event_name == 'push' || github.event_name == 'workflow_dispatch' }}
uses: dhis2-sre/gha-workflows/.github/workflows/im-build-test-deploy.yaml@DEVOPS-262
with:
PROCESS_NAME: nginx
POD_NAME: im-web-client
Expand Down
19 changes: 19 additions & 0 deletions .github/workflows/delete-env.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Delete deployed environment

on:
pull_request:
types: [closed]

# Cancel previous runs of the same workflow and PR number or branch/tag
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

jobs:
call-workflow:
# TODO update the branch reference before merging the PR
uses: dhis2-sre/gha-workflows/.github/workflows/im-delete-env.yaml@DEVOPS-262
secrets:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
KUBECONFIG: ${{ secrets.KUBECONFIG }}
2 changes: 1 addition & 1 deletion skaffold.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
apiVersion: skaffold/v2beta25
apiVersion: skaffold/v4beta6
kind: Config
build:
artifacts:
Expand Down

0 comments on commit 6bf2455

Please sign in to comment.