fix(ci): remove extra steps
This commit is contained in:
17
.github/workflows/ci.yml
vendored
17
.github/workflows/ci.yml
vendored
@@ -7,13 +7,13 @@ on:
|
|||||||
jobs:
|
jobs:
|
||||||
lint:
|
lint:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
- uses: NTBBloodbath/selene-action@v1.0.0
|
- uses: NTBBloodbath/selene-action@v1.0.0
|
||||||
with:
|
with:
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
args: lua
|
args: lua
|
||||||
|
|
||||||
docs:
|
docs:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
if: ${{ github.ref == 'refs/heads/main' }}
|
if: ${{ github.ref == 'refs/heads/main' }}
|
||||||
@@ -34,6 +34,7 @@ jobs:
|
|||||||
commit_user_name: "github-actions[bot]"
|
commit_user_name: "github-actions[bot]"
|
||||||
commit_user_email: "github-actions[bot]@users.noreply.github.com"
|
commit_user_email: "github-actions[bot]@users.noreply.github.com"
|
||||||
commit_author: "github-actions[bot] <github-actions[bot]@users.noreply.github.com>"
|
commit_author: "github-actions[bot] <github-actions[bot]@users.noreply.github.com>"
|
||||||
|
|
||||||
build:
|
build:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
if: ${{ github.ref == 'refs/heads/main' }}
|
if: ${{ github.ref == 'refs/heads/main' }}
|
||||||
@@ -50,13 +51,6 @@ jobs:
|
|||||||
neovim: true
|
neovim: true
|
||||||
version: stable
|
version: stable
|
||||||
|
|
||||||
- name: Setup git
|
|
||||||
run: |
|
|
||||||
printf 'BUILD_BRANCH=bot/build/%s\n' ${GITHUB_REF#refs/heads/} >> $GITHUB_ENV
|
|
||||||
|
|
||||||
- name: Checkout to build branch
|
|
||||||
run: git checkout -b ${BUILD_BRANCH}
|
|
||||||
|
|
||||||
- name: Run builder script
|
- name: Run builder script
|
||||||
run: |
|
run: |
|
||||||
mkdir -p autoload/lightline/colorscheme colors/ lua/lualine extras
|
mkdir -p autoload/lightline/colorscheme colors/ lua/lualine extras
|
||||||
@@ -76,13 +70,6 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
- name: Setup git
|
|
||||||
run: |
|
|
||||||
printf 'STYLE_BRANCH=bot/style/%s\n' ${GITHUB_REF#refs/heads/} >> $GITHUB_ENV
|
|
||||||
|
|
||||||
- name: Checkout to style branch
|
|
||||||
run: git checkout -b ${STYLE_BRANCH}
|
|
||||||
|
|
||||||
- uses: JohnnyMorganz/stylua-action@v2
|
- uses: JohnnyMorganz/stylua-action@v2
|
||||||
with:
|
with:
|
||||||
version: latest
|
version: latest
|
||||||
|
|||||||
48
.github/workflows/format.yml
vendored
48
.github/workflows/format.yml
vendored
@@ -1,48 +0,0 @@
|
|||||||
name: Format
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
paths:
|
|
||||||
- 'lua/**.lua'
|
|
||||||
- '**.md'
|
|
||||||
branches: [main, dev]
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
format:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
permissions:
|
|
||||||
contents: write
|
|
||||||
pull-requests: write
|
|
||||||
env:
|
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v3
|
|
||||||
|
|
||||||
- name: Setup git
|
|
||||||
run: |
|
|
||||||
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
|
|
||||||
git config --local user.name "github-actions[bot]"
|
|
||||||
printf 'STYLE_BRANCH=bot/style/%s\n' ${GITHUB_REF#refs/heads/} >> $GITHUB_ENV
|
|
||||||
|
|
||||||
- name: Checkout to style branch
|
|
||||||
run: git checkout -b ${STYLE_BRANCH}
|
|
||||||
|
|
||||||
- uses: JohnnyMorganz/stylua-action@v1
|
|
||||||
with:
|
|
||||||
version: 0.15.1
|
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
args: --config-path=.stylua.toml lua/
|
|
||||||
|
|
||||||
- uses: actions/setup-node@v3
|
|
||||||
- name: Apply prettier
|
|
||||||
run: |
|
|
||||||
npm install -g prettier
|
|
||||||
prettier --write **/*.md
|
|
||||||
|
|
||||||
- name: Create PR
|
|
||||||
run: |
|
|
||||||
if ! [[ -z $(git status -s) ]]; then
|
|
||||||
git add -u
|
|
||||||
git commit -m "chore: format"
|
|
||||||
git push --force https://${GITHUB_ACTOR}:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY} ${STYLE_BRANCH}
|
|
||||||
gh pr create --fill --base ${GITHUB_REF#refs/heads/} --head ${STYLE_BRANCH} || true
|
|
||||||
fi
|
|
||||||
Reference in New Issue
Block a user