Skip to content

Commit

Permalink
use action to commit and push
Browse files Browse the repository at this point in the history
  • Loading branch information
HectorCastelli committed Nov 19, 2023
1 parent a65735b commit 40ab65a
Showing 1 changed file with 9 additions and 17 deletions.
26 changes: 9 additions & 17 deletions .github/workflows/infrastructure.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,9 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
persist-credentials: false
fetch-depth: 0
- name: Install graphvix
run: sudo apt install graphviz
- uses: opentofu/setup-opentofu@v1
Expand All @@ -80,21 +83,12 @@ jobs:
GANDI_KEY: ${{ secrets.GANDI_KEY }}
IMPROVMX_API_TOKEN: ${{ secrets.IMPROVMX_API_TOKEN }}
run: terragrunt graph-dependencies | sed '2d' | dot -T png > "$GITHUB_WORKSPACE/graph.png"
- name: Configure Git
run: |
git config user.name "GitHub Actions"
git config user.email "actions@github.com"
- name: Commit updated graph
env:
GITHUB_TOKEN: ${{ secrets.GH_ADMIN_TOKEN }}
run: |
git add "$GITHUB_WORKSPACE/graph.png"
git commit -m "chore(graph): update graph dependencies"
- name: Push commit
env:
GITHUB_TOKEN: ${{ secrets.GH_ADMIN_TOKEN }}
run: |
git push origin "HEAD:$GITHUB_REF"
- name: GitHub Commit & Push
uses: actions-js/push@v1.4
with:
github_token: ${{ secrets.GH_ADMIN_TOKEN }}
message: "chore(graph): update graph dependencies"
branch: ${{ github.ref }}
apply:
name: "Terragrunt: Apply"
needs: [plan]
Expand All @@ -103,8 +97,6 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
persist-credentials: false
- uses: opentofu/setup-opentofu@v1
with:
tofu_wrapper: false
Expand Down

0 comments on commit 40ab65a

Please sign in to comment.