diff --git a/.github/workflows/dev.yml b/.github/workflows/dev.yml index cead1c3a..0e362bc1 100644 --- a/.github/workflows/dev.yml +++ b/.github/workflows/dev.yml @@ -98,15 +98,3 @@ jobs: branch: main directory: tenant-gitops repository: bcgov-c/tenant-gitops-ea352d - - - name: Deploy to Test Workflow - uses: peter-evans/workflow_dispatch@v2 - with: - workflow: 'Deploy to Test' - token: ${{ secrets.GITHUB_TOKEN }} - - - name: Deploy to Prod Workflow - uses: peter-evans/workflow_dispatch@v2 - with: - workflow: 'Deploy to Prod' - token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/prod.yml b/.github/workflows/prod.yml index e02209cb..dc2f0dc1 100644 --- a/.github/workflows/prod.yml +++ b/.github/workflows/prod.yml @@ -2,17 +2,16 @@ name: Deploy to Prod on: workflow_dispatch: - inputs: - approve: - description: 'Approve Deploy to Test.' - required: true jobs: build: - if: ${{ github.event.inputs.approve == 'true' }} + runs-on: ubuntu-22.04 steps: - uses: actions/checkout@master + - name: Export github reference var + run: echo "GITHUB_REFERENCE=$(echo ${GITHUB_REF#refs/tags/})" >> $GITHUB_ENV + - name: Checkout Tenant GitOps Repo uses: actions/checkout@v3 with: @@ -23,16 +22,12 @@ jobs: - name: Update Argo CD uses: mikefarah/yq@v4.34.1 - env: - GITHUB_REFERENCE: ${{ github.event.inputs.tag }} with: cmd: | yq -i '.drupal.tag = strenv(GITHUB_REFERENCE) | .nginx.tag = strenv(GITHUB_REFERENCE) ' tenant-gitops/helm-drupal/charts/drupal/values-mfin-data-catalogue-prod.yaml - name: Commit files - env: - GITHUB_REFERENCE: ${{ github.event.inputs.tag }} run: | cd tenant-gitops git config --local user.email "github-actions[bot]@users.noreply.github.com" diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index b5a4007e..674854ae 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -2,18 +2,16 @@ name: Deploy to Test on: workflow_dispatch: - inputs: - approve: - description: 'Approve Deploy to Test.' - required: true jobs: build: - if: ${{ github.event.inputs.approve == 'true' }} runs-on: ubuntu-22.04 steps: - uses: actions/checkout@master + - name: Export github reference var + run: echo "GITHUB_REFERENCE=$(echo ${GITHUB_REF#refs/tags/})" >> $GITHUB_ENV + - name: Checkout Tenant GitOps Repo uses: actions/checkout@v3 with: @@ -24,16 +22,12 @@ jobs: - name: Update Argo CD uses: mikefarah/yq@v4.34.1 - env: - GITHUB_REFERENCE: ${{ github.event.inputs.tag }} with: cmd: | yq -i '.drupal.tag = strenv(GITHUB_REFERENCE) | .nginx.tag = strenv(GITHUB_REFERENCE) ' tenant-gitops/helm-drupal/charts/drupal/values-mfin-data-catalogue-test.yaml - name: Commit files - env: - GITHUB_REFERENCE: ${{ github.event.inputs.tag }} run: | cd tenant-gitops git config --local user.email "github-actions[bot]@users.noreply.github.com"