59 lines
1.7 KiB
YAML
Executable File
59 lines
1.7 KiB
YAML
Executable File
# This is a basic workflow to help you get started with Actions
|
|
|
|
name: Monitors
|
|
|
|
# Controls when the action will run. Triggers the workflow on push or pull request
|
|
# events but only for the master branch
|
|
on: [push, pull_request]
|
|
|
|
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
|
|
jobs:
|
|
pre_job:
|
|
# continue-on-error: true # Uncomment once integration is finished
|
|
runs-on: ubuntu-latest
|
|
# Map a step output to a job output
|
|
outputs:
|
|
should_skip: ${{ steps.skip_check.outputs.should_skip }}
|
|
steps:
|
|
- id: skip_check
|
|
name: Skip Duplicate Actions
|
|
uses: fkirc/skip-duplicate-actions@v3.4.0
|
|
with:
|
|
concurrent_skipping: 'same_content'
|
|
do_not_skip: '["pull_request", "workflow_dispatch", "schedule"]'
|
|
|
|
check:
|
|
# The type of runner that the job will run on
|
|
needs: pre_job
|
|
if: ${{ needs.pre_job.outputs.should_skip != 'true' }}
|
|
#runs-on: hashicorp/terraform:full
|
|
runs-on: ubuntu-latest
|
|
container:
|
|
image: "claranet/terraform-ci:1.0.1"
|
|
|
|
# Steps represent a sequence of tasks that will be executed as part of the job
|
|
steps:
|
|
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
|
|
- name: Checkout
|
|
uses: actions/checkout@v2
|
|
with:
|
|
submodules: recursive
|
|
|
|
- name: Setup Terraform
|
|
uses: hashicorp/setup-terraform@v1
|
|
with:
|
|
terraform_version: 1.0.1
|
|
terraform_wrapper: false
|
|
|
|
- name: Run auto update
|
|
run: ./scripts/auto_update.sh
|
|
|
|
- name: Check git diff
|
|
run: ./scripts/auto_update.sh
|
|
|
|
- name: Run auto update
|
|
run: ./scripts/auto_update.sh
|
|
|
|
- name: Check for changes
|
|
run: git diff --exit-code
|