Skip to content

Commit

Permalink
Disables azure login in pipeline.
Browse files Browse the repository at this point in the history
  • Loading branch information
Robert Chu committed Apr 22, 2021
1 parent 3821d1d commit c5c6512
Showing 1 changed file with 19 additions and 4 deletions.
23 changes: 19 additions & 4 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -327,10 +327,10 @@ jobs:
echo ::set-output name=created::$(date -u +'%Y-%m-%dT%H:%M:%SZ')
echo ::set-output name=hashtag::"sha-${GITHUB_SHA::8}"
- name: Configure Azure credentials
uses: azure/login@v1
with:
creds: ${{ secrets.AZURE_CREDENTIALS }}
# - name: Configure Azure credentials
# uses: azure/login@v1
# with:
# creds: ${{ secrets.AZURE_CREDENTIALS }}

- name: Setup Terraform tfvars
uses: nowactions/envsubst@v1
Expand All @@ -354,13 +354,23 @@ jobs:
id: init
working-directory: ./terraform/azure
run: terraform init
env:
ARM_CLIENT_ID: ${{secrets.ARM_CLIENT_ID}}
ARM_CLIENT_SECRET: ${{secrets.ARM_CLIENT_SECRET}}
ARM_SUBSCRIPTION_ID: ${{secrets.ARM_SUBSCRIPTION_ID}}
ARM_TENANT_ID: ${{secrets.ARM_TENANT_ID}}

- name: Terraform Plan
id: plan
working-directory: ./terraform/azure
if: github.event_name == 'pull_request'
run: terraform plan -no-color
continue-on-error: true
env:
ARM_CLIENT_ID: ${{secrets.ARM_CLIENT_ID}}
ARM_CLIENT_SECRET: ${{secrets.ARM_CLIENT_SECRET}}
ARM_SUBSCRIPTION_ID: ${{secrets.ARM_SUBSCRIPTION_ID}}
ARM_TENANT_ID: ${{secrets.ARM_TENANT_ID}}

- uses: actions/github-script@v3
if: github.event_name == 'pull_request'
Expand Down Expand Up @@ -397,3 +407,8 @@ jobs:
working-directory: ./terraform/azure
if: (github.event_name == 'release') || (github.event_name == 'push' && github.ref == 'refs/heads/main')
run: terraform apply -auto-approve
env:
ARM_CLIENT_ID: ${{secrets.ARM_CLIENT_ID}}
ARM_CLIENT_SECRET: ${{secrets.ARM_CLIENT_SECRET}}
ARM_SUBSCRIPTION_ID: ${{secrets.ARM_SUBSCRIPTION_ID}}
ARM_TENANT_ID: ${{secrets.ARM_TENANT_ID}}

0 comments on commit c5c6512

Please sign in to comment.