generated from deploymenttheory/Template
-
Notifications
You must be signed in to change notification settings - Fork 0
52 lines (43 loc) · 1.69 KB
/
importer.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
43
44
45
46
47
48
49
50
51
52
name: Importer
on:
workflow_dispatch:
jobs:
importer:
name: "Import-Run"
runs-on: ubuntu-latest
environment: importer-lbgsandbox
env:
JP_TENANT_NAME: ${{ vars.JP_TENANT_NAME }}
JP_CLIENT_ID: ${{ secrets.JP_CLIENT_ID }}
JP_CLIENT_SECRET: ${{ secrets.JP_CLIENT_SECRET }}
WORKING_DIR: ${{ vars.WORKING_DIR }}
steps:
- name: "Checkout"
uses: actions/[email protected]
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.x'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install git+https://github.com/thejoeker12/[email protected]
pip install git+https://${{ secrets.PAT_TOKEN }}@github.com/deploymenttheory/[email protected]
pip install requests
- name: Run Python script
run: python scripts/import_via_config_file.py
- name: Install Terraform
uses: hashicorp/[email protected]
with:
terraform_version: latest
- name: Terraform fmt
run: |
cd importer_working_dir/
terraform fmt
- name: Commit back to Repo
run: |
git config --global user.email "[email protected]"
git config --global user.name "Github Action"
git add importer_working_dir/
git commit -m "Uploading output files"
git push