Open
Conversation
DrKJeff16
commented
Aug 6, 2025
Owner
|
I'm trying to see if I can connect github actions to sourechut builds, so that there's only one place where CI is run |
Contributor
Author
I have a useful StyLua Workflow that I use frequently ( # This is a basic workflow to help you get started with Actions
name: Stylua
# Controls when the workflow will run
on:
- push
- pull_request
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
check:
# The type of runner that the job will run on
runs-on: ubuntu-latest
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- name: Checkout
uses: actions/checkout@v4
- name: "Run stylua"
uses: JohnnyMorganz/stylua-action@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
version: latest # NOTE: we recommend pinning to a specific version in case of formatting changes
# CLI arguments
args: --check . |
Contributor
Author
|
Note that |
Contributor
Author
@p00f |
pre-commit hook to run StyLua on commitpre-commit config
Signed-off-by: Guennadi Maximov C <g.maxc.fox@protonmail.com>
bb4ed7c to
d65db98
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
pre-commitis useful for users that decide to use itto get hooks to run on commit.
I've added a very useful hook for running StyLua in case formatting wasn't made.