Skip to content

Commit

Permalink
ci: update reusable workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
mircea-pavel-anton committed Sep 6, 2024
1 parent 71404fa commit 2cfcebf
Show file tree
Hide file tree
Showing 6 changed files with 66 additions and 28 deletions.
18 changes: 16 additions & 2 deletions .github/workflows/docker-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,22 +5,36 @@ name: Docker Release
on:
workflow_dispatch:
inputs:
dry-run:
description: "Run the action without making changes"
default: true
required: false
type: boolean
custom-tag:
type: string
description: Additional custom tags for the image.
required: false

pull_request:
branches: ["main"]
paths:
- Dockerfile
- requirements.txt

push:
tags: ["*"]

jobs:
release:
uses: mirceanton/reusable-workflows/.github/workflows/docker-release.yaml@main
uses: mirceanton/reusable-workflows/.github/workflows/docker-release.yaml@feb7161818c3ae82cd4ea25c606c1feefa19643d
secrets: inherit
with:
image-name: ghcr.io/${{ github.repository }}
platforms: linux/amd64
custom-tag: ${{ inputs.custom-tag }}
tags: |
type=ref,event=tag
type=ref,event=pr
${{ github.event.inputs.custom-tag }}
context: .
dockerfile: ./Dockerfile
dry-run: "${{ github.event.inputs.dry-run }}"
20 changes: 17 additions & 3 deletions .github/workflows/git-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,27 @@
name: Git Release

on:
workflow_dispatch: {}
workflow_dispatch:
inputs:
dry-run:
description: "Dry run"
required: false
default: false
type: boolean

pull_request:
paths:
- ".github/workflows/git-release.yaml"
- "README.md"

push:
branches: ["main"]
paths:
- README.md # This file should be automatically generated when something changes in the docker image
- "README.md"

jobs:
release:
uses: mirceanton/reusable-workflows/.github/workflows/git-release-calver.yaml@main
uses: mirceanton/reusable-workflows/.github/workflows/git-release-calver.yaml@feb7161818c3ae82cd4ea25c606c1feefa19643d
secrets: inherit
with:
dry-run: ${{ inputs.dry-run || github.event.name == 'pull_request' }}
29 changes: 18 additions & 11 deletions .github/workflows/meta-label-sync.yaml
Original file line number Diff line number Diff line change
@@ -1,27 +1,34 @@
---
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json
name: "Meta: Label Sync"
name: Meta - Label Sync

on:
workflow_dispatch: {} # Manual Trigger
workflow_dispatch:
inputs:
dry-run:
description: "Run the action without making changes"
default: true
required: false
type: boolean

pull_request:
paths:
- ".github/configs/labels.yaml"
- ".github/workflows/meta-label-sync.yaml"

push:
branches: ["main"]
paths:
- ".github/configs/labels.yaml"
- ".github/workflows/meta-label-sync.yaml"

schedule:
- cron: "0 0 * * *" # Every day at midnight

permissions:
issues: write

concurrency:
group: ${{ github.workflow }}-${{ github.event.number || github.ref }}
cancel-in-progress: true

jobs:
label-sync:
uses: mirceanton/reusable-workflows/.github/workflows/meta-label-sync.yaml@main
uses: mirceanton/reusable-workflows/.github/workflows/meta-label-sync.yaml@feb7161818c3ae82cd4ea25c606c1feefa19643d
secrets: inherit
with:
config-file: .github/configs/labels.yaml
dry-run: ${{ github.event.inputs.dry-run || github.event_name == 'pull_request' }}
config-file: ".github/configs/labels.yaml"
9 changes: 4 additions & 5 deletions .github/workflows/meta-labeler.yaml
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
---
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json
name: "Meta: PR Labeler"
name: Meta - Labeler

on:
workflow_dispatch: {} # Manual Trigger
pull_request_target: {}

jobs:
labeler:
uses: mirceanton/reusable-workflows/.github/workflows/meta-labeler.yaml@main
pr-labeler:
uses: mirceanton/reusable-workflows/.github/workflows/meta-labeler.yaml@feb7161818c3ae82cd4ea25c606c1feefa19643d
secrets: inherit
with:
config-file: .github/configs/labeler.yaml
config-file: ".github/configs/labeler.yaml"
3 changes: 1 addition & 2 deletions .github/workflows/readme-generator.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@ on:
workflow_dispatch: {}

push:
branches:
- main
branches: ["main"]

pull_request:
paths:
Expand Down
15 changes: 10 additions & 5 deletions .github/workflows/renovate.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,19 @@ name: Renovate
on:
workflow_dispatch:
inputs:
dryRun:
dry-run:
description: Dry Run
default: "false"
required: false
logLevel:
log-level:
description: Log Level
default: debug
required: false
pull_request:
paths:
- ".github/workflows/renovate.yaml"
- ".github/configs/renovate/*.json5"
- "renovate.json5"
schedule:
- cron: "0 * * * *" # hourly

Expand All @@ -22,8 +27,8 @@ concurrency:

jobs:
renovate:
uses: mirceanton/reusable-workflows/.github/workflows/renovate.yaml@main
uses: mirceanton/reusable-workflows/.github/workflows/renovate.yaml@feb7161818c3ae82cd4ea25c606c1feefa19643d
secrets: inherit
with:
dryRun: "${{ inputs.dryRun == true }}"
logLevel: "${{ inputs.logLevel || 'debug' }}"
dry-run: "${{ inputs.dry-run == true || github.event_name == 'pull_request' }}"
log-level: "${{ inputs.log-level || 'debug' }}"

0 comments on commit 2cfcebf

Please sign in to comment.