Reconfigure & expand github workflows

This commit is contained in:
Henrik Lissner 2021-05-07 20:51:24 -04:00
parent 6e541b01e5
commit ddd1ae43f8
5 changed files with 63 additions and 41 deletions

15
.github/labeler.yml vendored Normal file
View file

@ -0,0 +1,15 @@
# For workflows/labeler.yml
"re:docs": '*.+(md|org)'
":core": ['core/*.el', 'docs/*']
":core lib": 'core/autoload/**/*.el'
"re:packages": '**/packages.el'
"re:bin": ['bin/**/*', '!bin/doom']
"re:bin/doom": ['core/core-cli.el', 'core/cli/*', 'bin/doom']
"re:bin/doom:doctor": '**/doctor.el'
"re:bin/doom:env": 'core/cli/env.el'
# TODO automate generation of labels for modules

26
.github/workflows/labeler.yml vendored Normal file
View file

@ -0,0 +1,26 @@
name: 'Auto-label Issues/PRs'
on:
pull_request:
types: [opened]
issues:
types: [opened]
jobs:
build:
runs-on: ubuntu-latest
name: is-sponsor-label
env:
GITHUB_TOKEN: ${{ github.token }}
steps:
# - name: Checkout
# uses: actions/checkout@v2
- uses: actions/labeler@main
description: "Auto-label PRs by target files (see ../labeler.yml)"
- uses: JasonEtco/is-sponsor-label-action@v1
description: "Label issues/PRs created by sponsors"
with:
label: ':heart:'
# - name: Synchronize labels
# uses: julb/action-manage-label@v1
# with:
# from: .github/labels.yml
# skip_delete: false

View file

@ -11,4 +11,4 @@ jobs:
- uses: dessant/lock-threads@v2 - uses: dessant/lock-threads@v2
with: with:
github-token: ${{ github.token }} github-token: ${{ github.token }}
issue-lock-inactive-days: '180' issue-lock-inactive-days: '90'

View file

@ -1,21 +0,0 @@
name: Remove needs-reply label
on:
issue_comment:
types:
- created
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Remove needs-reply label
uses: octokit/request-action@v2.x
continue-on-error: true
with:
route: DELETE /repos/:repository/issues/:issue/labels/:label
repository: ${{ github.repository }}
issue: ${{ github.event.issue.number }}
label: "status:needs-reply"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

View file

@ -1,37 +1,39 @@
name: CI name: CI
on: on:
push:
branches:
- develop
pull_request: pull_request:
push:
paths-ignore:
- '**.md'
- '**.org'
- '.dir-locals.el'
- 'LICENSE'
branches: branches:
- main
- develop - develop
jobs: jobs:
build: build:
if: false runs-on: ${{ matrix.os }}
runs-on: ubuntu-latest
strategy: strategy:
matrix: matrix:
emacs_version: os: [ubuntu-latest, macos-latest]
- 26.3 emacs_version: [27.1, 27.2, snapshot]
- 27.1
include:
- emacs_version: 26.3
lint_ignore: 1
env:
EMACS_LINT_IGNORE: ${{ matrix.lint_ignore }}
steps: steps:
- uses: purcell/setup-emacs@master - uses: purcell/setup-emacs@master
with: with:
version: ${{ matrix.emacs_version }} version: ${{ matrix.emacs_version }}
- name: Check out doom-emacs
- uses: actions/checkout@v2 uses: actions/checkout@v2
- name: Doom version - name: Set up test Doom profile
run: "bin/doom version" run: bin/doom test
- name: Run tests - name: Cache package builds
run: "bin/doom test" uses: actions/cache@v2
with:
path: .local/straight/repos
key: ${{ runner.os }}-build-doom-packages-${{ hashFiles('**/packages.el') }}
restore-keys: |
${{ runner.os }}-build-doom-packages-
# FIXME # FIXME
# name: Compile # name: Compile
# run: "bin/doom -y compile" # run: "bin/doom -y compile"