Skip to content

Commit

Permalink
essential gh actions
Browse files Browse the repository at this point in the history
  • Loading branch information
samidbb committed Mar 20, 2024
1 parent 8e7e087 commit e04ed3f
Show file tree
Hide file tree
Showing 4 changed files with 74 additions and 0 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/auto-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Auto release on merge

on:
push:
branches: [master, main]
paths-ignore:
- .github/**
- "**/*.md"
- .gitignore
- .pre-commit-config.yaml
- .tflint.hcl
- LICENSE
- renovate.json
- examples/**
- scripts/**
- tests/**

jobs:
auto-release:
runs-on: ubuntu-latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- id: release
uses: rymndhng/release-on-push-action@master
with:
bump_version_scheme: patch
tag_prefix: ""

- name: Dispatch to blueprints
run: |
curl -X POST https://api.github.com/repos/dfds/infrastructure-blueprints/dispatches \
-H 'Accept: application/vnd.github.everest-preview+json' \
-u ${{ secrets.AUTH_TOKEN }} \
--data '{"event_type": "trigger-workflow", "client_payload": { "release_tag": "${{ steps.release.outputs.tag_name }}" }}'
10 changes: 10 additions & 0 deletions .github/workflows/block-on-hold-prs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
name: Block on-hold PRs

on:
pull_request:
branches: [ master, main ]
types: [ opened, labeled, unlabeled, synchronize ]

jobs:
shared:
uses: dfds/shared-workflows/.github/workflows/automation-on-hold-prs.yml@master
14 changes: 14 additions & 0 deletions .github/workflows/enforce-labels.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: Enforce PR labels

on:
pull_request:
types: [labeled, unlabeled, opened, edited, synchronize]
branches: [main]
jobs:
enforce-label:
runs-on: ubuntu-latest
steps:
- uses: yogevbd/enforce-label-action@2.2.2
with:
REQUIRED_LABELS_ANY: "release:minor,release:major,release:patch,norelease"
REQUIRED_LABELS_ANY_DESCRIPTION: "Select at least one label ['release:minor','release:major','release:patch', 'norelease']"
15 changes: 15 additions & 0 deletions .github/workflows/housekeeping.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: Housekeeping

on:
schedule:
- cron: "0 6 * * 1"

jobs:
shared:
uses: dfds/shared-workflows/.github/workflows/automation-housekeeping.yml@master
secrets: inherit
with:
delete_head_branch: true
squash_merge: true
branch_protection: true
status_checks: false

0 comments on commit e04ed3f

Please sign in to comment.