-
-
Notifications
You must be signed in to change notification settings - Fork 4
42 lines (40 loc) · 1.48 KB
/
tf-refresh.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
name: Refresh Terraform State
on:
workflow_dispatch:
schedule:
- cron: '0 0 * * 0'
jobs:
refresh-Infrastructure:
runs-on: ubuntu-latest
name: Refresh Main Infrastructure
env:
ARTIFACTORY_USERNAME: ${{ secrets.ARTIFACTORY_USER }}
ARTIFACTORY_PASSWORD: ${{ secrets.ARTIFACTORY_PASSWORD }}
MONGODB_ATLAS_PUBLIC_KEY: ${{ secrets.MONGODB_ATLAS_PUBLIC_KEY }}
MONGODB_ATLAS_PRIVATE_KEY: ${{ secrets.MONGODB_ATLAS_PRIVATE_KEY }}
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
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 }}
steps:
- name: Checkout
uses: actions/[email protected]
- name: Setup Terraform environment
uses: little-core-labs/[email protected]
with:
version: 0.14.9
- name: Terraform init
run: terraform init
working-directory: infra
- uses: benjlevesque/[email protected]
id: short-sha
with:
length: 7
- name: Terraform refresh
run: terraform refresh
working-directory: infra
env:
TF_VAR_docker_registry_username: ${{ secrets.GH_PKG_USER }}
TF_VAR_docker_registry_password: ${{ secrets.GH_PKG_PASSWORD }}
TF_VAR_docker_image_tag: docker.pkg.github.com/mpetuska/kamp/app:sha-${{ steps.short-sha.outputs.sha }}