Skip to content

Commit

Permalink
ci: add dependabot
Browse files Browse the repository at this point in the history
- Keep GitHub Actions up to date
- Use the latest `actions/checkout`
  • Loading branch information
matijs committed Apr 29, 2024
1 parent 8ef804e commit 8b727b1
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 28 deletions.
11 changes: 11 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
version: 2

updates:
- package-ecosystem: 'github-actions'
directory: '/'
schedule:
interval: 'monthly'
timezone: 'Europe/Amsterdam'
time: '09:00'
reviewers:
- 'nl-design-system/kernteam-dependabot'
55 changes: 27 additions & 28 deletions .github/workflows/terraform.yml
Original file line number Diff line number Diff line change
@@ -1,44 +1,43 @@
name: 'Terraform Apply'
name: Terraform Apply
on:
push:
branches:
- main

env:
TF_CLOUD_ORGANIZATION: "${{ secrets.TF_CLOUD_ORGANIZATION }}"
TF_API_TOKEN: "${{ secrets.TF_API_TOKEN }}"
TF_WORKSPACE: "${{ secrets.TF_WORKSPACE }}"
CONFIG_DIRECTORY: "./"
TF_CLOUD_ORGANIZATION: '${{ secrets.TF_CLOUD_ORGANIZATION }}'
TF_API_TOKEN: '${{ secrets.TF_API_TOKEN }}'
TF_WORKSPACE: '${{ secrets.TF_WORKSPACE }}'
CONFIG_DIRECTORY: './'

jobs:
terraform:
if: github.repository != 'hashicorp-education/learn-terraform-github-actions'
name: "Terraform Apply"
name: Terraform Apply
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Checkout
uses: actions/checkout@v4.1.1

- name: Upload Configuration
uses: hashicorp/tfc-workflows-github/actions/[email protected]
id: apply-upload
with:
workspace: ${{ env.TF_WORKSPACE }}
directory: ${{ env.CONFIG_DIRECTORY }}
- name: Upload Configuration
uses: hashicorp/tfc-workflows-github/actions/[email protected]
id: apply-upload
with:
workspace: ${{ env.TF_WORKSPACE }}
directory: ${{ env.CONFIG_DIRECTORY }}

- name: Create Apply Run
uses: hashicorp/tfc-workflows-github/actions/[email protected]
id: apply-run
with:
workspace: ${{ env.TF_WORKSPACE }}
configuration_version: ${{ steps.apply-upload.outputs.configuration_version_id }}
- name: Create Apply Run
uses: hashicorp/tfc-workflows-github/actions/[email protected]
id: apply-run
with:
workspace: ${{ env.TF_WORKSPACE }}
configuration_version: ${{ steps.apply-upload.outputs.configuration_version_id }}

- name: Apply
uses: hashicorp/tfc-workflows-github/actions/[email protected]
if: fromJSON(steps.apply-run.outputs.payload).data.attributes.actions.IsConfirmable
id: apply
with:
run: ${{ steps.apply-run.outputs.run_id }}
comment: "Apply Run from GitHub Actions CI ${{ github.sha }}"
- name: Apply
uses: hashicorp/tfc-workflows-github/actions/[email protected]
if: fromJSON(steps.apply-run.outputs.payload).data.attributes.actions.IsConfirmable
id: apply
with:
run: ${{ steps.apply-run.outputs.run_id }}
comment: 'Apply Run from GitHub Actions CI ${{ github.sha }}'

0 comments on commit 8b727b1

Please sign in to comment.