Skip to content

Commit

Permalink
Merge pull request #30 from PerfectThymeTech/marvinbuss/workflow_cosm…
Browse files Browse the repository at this point in the history
…etic_changes

Workflow Cosmetic Changes
  • Loading branch information
marvinbuss authored Jan 16, 2024
2 parents d228ef1 + 0f69d35 commit ed28580
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 13 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/_containerTemplate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ on:
jobs:
deployment:
name: Container Build & Push
runs-on: ubuntu-latest
runs-on: [ubuntu-latest]
continue-on-error: false
environment: ${{ inputs.environment }}

Expand All @@ -54,8 +54,8 @@ jobs:

# Install cosign
- name: Install cosign
uses: sigstore/[email protected]
id: install_cosign
uses: sigstore/[email protected]
if: github.event_name != 'pull_request'
with:
cosign-release: 'v2.2.0'
Expand All @@ -72,8 +72,8 @@ jobs:

# Login Container Registry
- name: Login Container Registry
uses: docker/[email protected]
id: registry_login
uses: docker/[email protected]
if: github.event_name != 'pull_request'
with:
registry: ${{ inputs.registry_uri }}
Expand Down
14 changes: 9 additions & 5 deletions .github/workflows/_terraformEnvironmentTemplate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ on:
required: true
type: string
description: "Specifies the terraform version."
node_version:
required: true
type: number
description: "Specifies the node version."
working_directory:
required: true
type: string
Expand Down Expand Up @@ -46,7 +50,7 @@ permissions:
jobs:
lint:
name: Terraform Lint
runs-on: ubuntu-latest
runs-on: [ubuntu-latest]
continue-on-error: false

steps:
Expand Down Expand Up @@ -92,7 +96,7 @@ jobs:
plan:
name: Terraform Plan
runs-on: self-hosted
runs-on: [self-hosted]
continue-on-error: false
environment: ${{ inputs.environment }}
needs: [lint]
Expand All @@ -110,7 +114,7 @@ jobs:
id: node_setup
uses: actions/setup-node@v4
with:
node-version: 18
node-version: ${{ inputs.node_version }}

# Setup Terraform
- name: Setup Terraform
Expand Down Expand Up @@ -186,7 +190,7 @@ jobs:
apply:
name: Terraform Apply
runs-on: self-hosted
runs-on: [self-hosted]
continue-on-error: false
environment: ${{ inputs.environment }}
if: github.event_name == 'push' || github.event_name == 'release'
Expand All @@ -205,7 +209,7 @@ jobs:
id: node_setup
uses: actions/setup-node@v4
with:
node-version: 18
node-version: ${{ inputs.node_version }}

# Setup Terraform
- name: Setup Terraform
Expand Down
14 changes: 10 additions & 4 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ on:
jobs:
lint:
name: Lint and Test
runs-on: ubuntu-latest
runs-on: [ubuntu-latest]
continue-on-error: false

steps:
# Setup Python 3.11
Expand All @@ -37,8 +38,13 @@ jobs:
- name: Run Linting
id: linting
run: |
pip install -r requirements.txt -q
echo "Install dependencies"
python3 -m pip install -r requirements.txt -q
echo "Initialize Git"
git init
git add *
pre-commit install --install-hooks
pre-commit run --all-files --verbose
echo "Run pre-commit"
python3 -m pre_commit install --install-hooks
python3 -m pre_commit run --all-files --verbose
1 change: 0 additions & 1 deletion .github/workflows/newMajorVersion.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ permissions:
env:
TAG_NAME: ${{ github.event.inputs.tag_name || github.event.release.tag_name }}


jobs:
update_tag:
name: Update the major tag to include the ${{ github.event.inputs.tag_name || github.event.release.tag_name }} changes
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/terraform.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,15 @@ on:
paths:
- "**.tf"
- "code/infra/**"
- ".github/workflows/terraform.yml"

pull_request:
branches:
- main
paths:
- "**.tf"
- "code/infra/**"
- ".github/workflows/terraform.yml"

jobs:
terraform_dev:
Expand All @@ -22,6 +24,7 @@ jobs:
environment: "dev"
config: "PerfectThymeTech"
terraform_version: "1.6.6"
node_version: 18
working_directory: "./code/infra"
tenant_id: "3556be79-2979-4b19-a1af-4dd4e6d9ed7e"
subscription_id: "8f171ff9-2b5b-4f0f-aed5-7fa360a1d094"
Expand Down

0 comments on commit ed28580

Please sign in to comment.