winstxnhdw/actions
A repository for my collection of reusable workflows.
actions
This repository contains a collection of my reusable GitHub workflows and composite actions. Most actions are handwritten for performance and security, except for officially maintained actions.
Actions
upload-patch
Composite action for creating a patch from git diff and uploading it as an artifact.
- name: Upload patch
id: patch
uses: winstxnhdw/actions/upload-patch@main
with:
name: diff-patch
path: diff.patchMinimally, you can use it in the following manner.
- name: Upload patch
id: patch
uses: winstxnhdw/actions/upload-patch@mainThe action has the following output(s).
| Output | Description |
|---|---|
patched |
Whether there are changes to patch |
Workflows
- bun.yml
- codespell.yml
- dependabot.yml
- docker-build.yml
- docker-push.yml
- format-biome.yml
- format-push.yml
- format-python.yml
- keep-alive.yml
- python.yml
- release.yml
- rust.yml
- scaffold.yml
- spaces-deploy.yml
- spaces-restart.yml
- spaces-warmer.yml
- uv.yml
bun.yml
Reusable Bun workflow for lint/test/build.
jobs:
bun:
uses: winstxnhdw/actions/.github/workflows/bun.yml@main
with:
disable-formatter: false
disable-linter: false
disable-test: false
disable-build: false
build-args: --testMinimally, you can use it in the following manner.
jobs:
bun:
uses: winstxnhdw/actions/.github/workflows/bun.yml@maincodespell.yml
Reusable codespell workflow for checking misspelled words in source code.
jobs:
codespell:
uses: winstxnhdw/actions/.github/workflows/codespell.yml@main
with:
path: /
skip: ''
ignore_words_file: .codespellignoreMinimally, you can use it in the following manner.
jobs:
codespell:
uses: winstxnhdw/actions/.github/workflows/codespell.yml@maindependabot.yml
Reusable Dependabot workflow for auto-merging Dependabot pull requests.
permissions:
contents: write
pull-requests: write
jobs:
auto-merge:
uses: winstxnhdw/actions/.github/workflows/dependabot.yml@main
secrets:
token: ${{ secrets.GITHUB_TOKEN }}Minimally, you can use it in the following manner.
permissions:
contents: write
jobs:
auto-merge:
uses: winstxnhdw/actions/.github/workflows/dependabot.yml@maindocker-build.yml
Reusable Docker workflow for building Docker images.
jobs:
build:
uses: winstxnhdw/actions/.github/workflows/docker-build.yml@main
with:
file: Dockerfile.build
cache-mode: max
build-args: |
ARG_1=arg_1_value
ARG_2=arg_2_valueMinimally, you can use it in the following manner.
jobs:
build:
uses: winstxnhdw/actions/.github/workflows/docker-build.yml@maindocker-push.yml
Reusable Docker workflow for pushing Docker images into the GitHub Container registry.
permissions:
packages: write
jobs:
build:
uses: winstxnhdw/actions/.github/workflows/docker-push.yml@main
with:
file: Dockerfile.build
secrets:
token: ${{ secrets.GITHUB_TOKEN }}Minimally, you can use it in the following manner.
permissions:
packages: write
jobs:
build:
uses: winstxnhdw/actions/.github/workflows/docker-push.yml@main
secrets:
token: ${{ secrets.GITHUB_TOKEN }}format-biome.yml
Reusable Bun workflow for fixing Bun formatting and lints with Biome.
permissions:
contents: write
jobs:
format:
uses: winstxnhdw/actions/.github/workflows/format-biome.yml@main
secrets:
token: ${{ secrets.PAT }}
ssh-key: ${{ secrets.DEPLOY_KEY }}Minimally, you can use it in the following manner.
permissions:
contents: write
jobs:
format:
uses: winstxnhdw/actions/.github/workflows/format-biome.yml@mainformat-push.yml
Reusable workflow for downloading a format patch artifact, applying it, and pushing the commit.
permissions:
contents: write
jobs:
push:
uses: winstxnhdw/actions/.github/workflows/format-push.yml@main
with:
message: "style: format scripts"
secrets:
token: ${{ secrets.PAT }}
ssh-key: ${{ secrets.DEPLOY_KEY }}Minimally, you can use it in the following manner.
permissions:
contents: write
jobs:
push:
uses: winstxnhdw/actions/.github/workflows/format-push.yml@mainformat-python.yml
Reusable Python workflow for fixing Python formatting with ruff.
permissions:
contents: write
jobs:
format:
uses: winstxnhdw/actions/.github/workflows/format-python.yml@main
secrets:
token: ${{ secrets.PAT }}
ssh-key: ${{ secrets.DEPLOY_KEY }}Minimally, you can use it in the following manner.
permissions:
contents: write
jobs:
format:
uses: winstxnhdw/actions/.github/workflows/format-python.yml@mainkeep-alive.yml
Reusable workflow for keeping your GitHub workflows alive. GitHub will suspend a workflow after 60 days of inactivity. Learn more here.
name: Keep Alive
on:
schedule:
# ┌──────────────── minute (0 - 59)
# │ ┌────────────── hour (0 - 23)
# │ │ ┌──────────── day of the month (1 - 31)
# │ │ │ ┌────────── month (1 - 12 or JAN-DEC)
# │ │ │ │ ┌──────── day of the week (0 - 6 or SUN-SAT)
# │ │ │ │ │
# │ │ │ │ │
# │ │ │ │ │
# * * * * *
- cron: 0 0 1 * *
permissions:
contents: write
jobs:
keep-alive:
uses: winstxnhdw/actions/.github/workflows/keep-alive.yml@mainpython.yml
Reusable Python workflow for lint/test/build with Poetry, Ruff and Pyright.
jobs:
python:
uses: winstxnhdw/actions/.github/workflows/python.yml@main
with:
runs-on: ubuntu-latest
python-version: '*'
disable-test: falseMinimally, you can use it in the following manner.
jobs:
python:
uses: winstxnhdw/actions/.github/workflows/python.yml@mainrelease.yml
Reusable workflow for naively uploading a releases to GitHub from a workflow artifact.
permissions:
contents: write
jobs:
release:
uses: winstxnhdw/actions/.github/workflows/release.yml@main
with:
release-tag: latest
release-title: Build
release-asset: dist/*
artifact-name: build
artifact-path: dist/Minimally, you can use it in the following manner.
permissions:
contents: write
jobs:
release:
uses: winstxnhdw/actions/.github/workflows/release.yml@main
with:
release-tag: latest
release-title: Build
release-asset: dist/*
artifact-name: buildrust.yml
Reusable Rust workflow for linting.
jobs:
rust:
uses: winstxnhdw/actions/.github/workflows/rust.yml@main
with:
working-directory: .
disable-test: falseMinimally, you can use it in the following manner.
jobs:
rust:
uses: winstxnhdw/actions/.github/workflows/rust.yml@mainscaffold.yml
Reusable GitHub template workflow for dynamically renaming the repository when creating a new repository from a template.
on: scaffold
permissions:
contents: write
jobs:
scaffold:
uses: winstxnhdw/actions/.github/workflows/scaffold.yml@mainspaces-deploy.yml
Reusable Hugging Face Spaces workflow for deploying a Dockerfile to a Hugging Face Space of the same repository name.
Important
This workflow assumes that your Hugging Face account has the same user and repository name as the GitHub repository running this workflow.
jobs:
deploy:
uses: winstxnhdw/actions/.github/workflows/spaces-deploy.yml@main
secrets:
token: ${{ secrets.HF_TOKEN }}spaces-restart.yml
Reusable Hugging Face Spaces workflow for factory restarting a Hugging Face Space of the same repository name.
Important
This workflow assumes that your Hugging Face account has the same user and repository name as the GitHub repository running this workflow.
jobs:
restart:
uses: winstxnhdw/actions/.github/workflows/spaces-restart.yml@main
secrets:
token: ${{ secrets.HF_TOKEN }}spaces-warmer.yml
Reusable Hugging Face Spaces workflow for warming a Hugging Face Space of the same repository name.
Important
This workflow assumes that your Hugging Face account has the same user and repository name as the GitHub repository running this workflow.
name: Warm
on:
schedule:
# ┌──────────────── minute (0 - 59)
# │ ┌────────────── hour (0 - 23)
# │ │ ┌──────────── day of the month (1 - 31)
# │ │ │ ┌──────── month (1 - 12 or JAN-DEC)
# │ │ │ │ ┌────── day of the week (0 - 6 or SUN-SAT)
# │ │ │ │ │
# │ │ │ │ │
# │ │ │ │ │
# * * * * *
- cron: 0 0 */2 * *
jobs:
warm:
uses: winstxnhdw/actions/.github/workflows/spaces-warmer.yml@main
with:
path: '/api/v3'
secrets:
token: ${{ secrets.HF_TOKEN }}Minimally, you can use it in the following manner.
name: Warm
on:
schedule:
# ┌──────────────── minute (0 - 59)
# │ ┌────────────── hour (0 - 23)
# │ │ ┌──────────── day of the month (1 - 31)
# │ │ │ ┌──────── month (1 - 12 or JAN-DEC)
# │ │ │ │ ┌────── day of the week (0 - 6 or SUN-SAT)
# │ │ │ │ │
# │ │ │ │ │
# │ │ │ │ │
# * * * * *
- cron: 0 0 */2 * *
jobs:
warm:
uses: winstxnhdw/actions/.github/workflows/spaces-warmer.yml@mainuv.yml
Reusable Python workflow for lint/test/build with uv, Ruff and Pyright.
jobs:
python:
uses: winstxnhdw/actions/.github/workflows/uv.yml@main
with:
runs-on: ubuntu-latest
recursive-clone: false
python-version: '*'
disable-lint: false
disable-type-check: false
disable-test: false
install-project: false
working-directory: .Minimally, you can use it in the following manner.
jobs:
python:
uses: winstxnhdw/actions/.github/workflows/uv.yml@main