Workflow updates

Signed-off-by: Mark Bolwell <mark.bollyuk@gmail.com>
This commit is contained in:
Mark Bolwell 2026-04-08 12:51:49 +01:00
parent eedb2188c3
commit 5783bf4ce4
No known key found for this signature in database
GPG key ID: 997FF7FE93AEB5B9
3 changed files with 259 additions and 263 deletions

View file

@ -1,8 +1,8 @@
--- ---
name: Devel pipeline name: Devel pipeline
on: # yamllint disable-line rule:truthy on: # yamllint disable-line rule:truthy
pull_request_target: pull_request_target:
types: [opened, reopened, synchronize] types: [opened, reopened, synchronize]
branches: branches:
@ -17,9 +17,9 @@
# Allow manual running of workflow # Allow manual running of workflow
workflow_dispatch: workflow_dispatch:
# A workflow run is made up of one or more jobs # A workflow run is made up of one or more jobs
# that can run sequentially or in parallel # that can run sequentially or in parallel
jobs: jobs:
# This will create messages for first time contributers and direct them to the Discord server # This will create messages for first time contributers and direct them to the Discord server
welcome: welcome:
runs-on: ubuntu-latest runs-on: ubuntu-latest
@ -65,7 +65,7 @@
steps: steps:
- name: Git clone the lockdown repository to test - name: Git clone the lockdown repository to test
uses: actions/checkout@v4 uses: actions/checkout@v6.0.2
with: with:
ref: ${{ github.event.pull_request.head.sha }} ref: ${{ github.event.pull_request.head.sha }}
@ -81,7 +81,7 @@
# Pull in terraform code for linux servers # Pull in terraform code for linux servers
- name: Clone GitHub IaC plan - name: Clone GitHub IaC plan
uses: actions/checkout@v4 uses: actions/checkout@v6.0.2
with: with:
repository: ansible-lockdown/github_linux_IaC repository: ansible-lockdown/github_linux_IaC
path: .github/workflows/github_linux_IaC path: .github/workflows/github_linux_IaC
@ -128,6 +128,7 @@
env: env:
OSVAR: ${{ vars.OSVAR }} OSVAR: ${{ vars.OSVAR }}
TF_VAR_benchmark_type: ${{ vars.BENCHMARK_TYPE }} TF_VAR_benchmark_type: ${{ vars.BENCHMARK_TYPE }}
TF_VAR_ansible_version: ${{ vars.ANSIBLE_RUNNER_VERSION }}
TF_VAR_privsubnet_id: ${{ secrets.AWS_PRIVSUBNET_ID }} TF_VAR_privsubnet_id: ${{ secrets.AWS_PRIVSUBNET_ID }}
TF_VAR_vpc_secgrp_id: ${{ secrets.AWS_VPC_SECGRP_ID }} TF_VAR_vpc_secgrp_id: ${{ secrets.AWS_VPC_SECGRP_ID }}
run: tofu apply -var-file "${OSVAR}.tfvars" --auto-approve -input=false run: tofu apply -var-file "${OSVAR}.tfvars" --auto-approve -input=false
@ -137,7 +138,7 @@
if: env.ENABLE_DEBUG == 'true' if: env.ENABLE_DEBUG == 'true'
run: cat hosts.yml run: cat hosts.yml
# Aws deployments taking a while to come up insert sleep or playbook fails # Aws deployments taking a while to come up insert sleep or playbook fails
- name: Sleep to allow system to come up - name: Sleep to allow system to come up
run: sleep ${{ vars.BUILD_SLEEPTIME }} run: sleep ${{ vars.BUILD_SLEEPTIME }}

View file

@ -2,12 +2,6 @@
name: Export Private Repo Badges name: Export Private Repo Badges
# Use different minute offsets with the same hourly pattern:
# Repo Group Suggested Cron Expression Explanation
# Group A 0 */6 * * * Starts at top of hour
# Group B 10 */6 * * * Starts at 10 after
# And So On
on: on:
push: push:
branches: branches:

View file

@ -1,8 +1,8 @@
--- ---
name: Main pipeline name: Main pipeline
on: # yamllint disable-line rule:truthy on: # yamllint disable-line rule:truthy
pull_request_target: pull_request_target:
types: [opened, reopened, synchronize] types: [opened, reopened, synchronize]
branches: branches:
@ -15,15 +15,15 @@
- '**.ps1' - '**.ps1'
- '**.cfg' - '**.cfg'
# Allow permissions for AWS auth # Allow permissions for AWS auth
permissions: permissions:
id-token: write id-token: write
contents: read contents: read
pull-requests: read pull-requests: read
# A workflow run is made up of one or more jobs # A workflow run is made up of one or more jobs
# that can run sequentially or in parallel # that can run sequentially or in parallel
jobs: jobs:
# This workflow contains a single job that tests the playbook # This workflow contains a single job that tests the playbook
playbook-test: playbook-test:
# The type of runner that the job will run on # The type of runner that the job will run on
@ -32,7 +32,7 @@
ENABLE_DEBUG: ${{ vars.ENABLE_DEBUG }} ENABLE_DEBUG: ${{ vars.ENABLE_DEBUG }}
# Imported as a variable by terraform # Imported as a variable by terraform
TF_VAR_repository: ${{ github.event.repository.name }} TF_VAR_repository: ${{ github.event.repository.name }}
AWS_REGION : "us-east-1" AWS_REGION: "us-east-1"
ANSIBLE_VERSION: ${{ vars.ANSIBLE_RUNNER_VERSION }} ANSIBLE_VERSION: ${{ vars.ANSIBLE_RUNNER_VERSION }}
defaults: defaults:
run: run:
@ -43,7 +43,7 @@
steps: steps:
- name: Git clone the lockdown repository to test - name: Git clone the lockdown repository to test
uses: actions/checkout@v4 uses: actions/checkout@v6.0.2
with: with:
ref: ${{ github.event.pull_request.head.sha }} ref: ${{ github.event.pull_request.head.sha }}
@ -59,7 +59,7 @@
# Pull in terraform code for linux servers # Pull in terraform code for linux servers
- name: Clone GitHub IaC plan - name: Clone GitHub IaC plan
uses: actions/checkout@v4 uses: actions/checkout@v6.0.2
with: with:
repository: ansible-lockdown/github_linux_IaC repository: ansible-lockdown/github_linux_IaC
path: .github/workflows/github_linux_IaC path: .github/workflows/github_linux_IaC
@ -107,6 +107,7 @@
env: env:
OSVAR: ${{ vars.OSVAR }} OSVAR: ${{ vars.OSVAR }}
TF_VAR_benchmark_type: ${{ vars.BENCHMARK_TYPE }} TF_VAR_benchmark_type: ${{ vars.BENCHMARK_TYPE }}
TF_VAR_ansible_version: ${{ vars.ANSIBLE_RUNNER_VERSION }}
TF_VAR_privsubnet_id: ${{ secrets.AWS_PRIVSUBNET_ID }} TF_VAR_privsubnet_id: ${{ secrets.AWS_PRIVSUBNET_ID }}
TF_VAR_vpc_secgrp_id: ${{ secrets.AWS_VPC_SECGRP_ID }} TF_VAR_vpc_secgrp_id: ${{ secrets.AWS_VPC_SECGRP_ID }}
run: tofu apply -var-file "${OSVAR}.tfvars" --auto-approve -input=false run: tofu apply -var-file "${OSVAR}.tfvars" --auto-approve -input=false
@ -116,7 +117,7 @@
if: env.ENABLE_DEBUG == 'true' if: env.ENABLE_DEBUG == 'true'
run: cat hosts.yml run: cat hosts.yml
# Aws deployments taking a while to come up insert sleep or playbook fails # Aws deployments taking a while to come up insert sleep or playbook fails
- name: Sleep to allow system to come up - name: Sleep to allow system to come up
run: sleep ${{ vars.BUILD_SLEEPTIME }} run: sleep ${{ vars.BUILD_SLEEPTIME }}