Skip to content

Commit

Permalink
Modernizes the github actions (#3428)
Browse files Browse the repository at this point in the history
* Modernizes the docker and compile CL actions

* Renames the CI action to be more descriptive

* Reverts the CL compile action to work on a schedule

* Removes the action if-statements

* CLs compile once every hour

* Adds extra support for PR labels

* Corrects the `make_changelogs`logic

* YAML formatting

* removes push trigger from the labels action

* extra PR trigger for labels action

* formatting/grammar

* labels action config changes

* label changes

* Adds github file changes to labeler config

* adds `sound` label support
  • Loading branch information
Crossedfall authored Jan 18, 2021
1 parent b1396a2 commit 09d9910
Show file tree
Hide file tree
Showing 10 changed files with 48 additions and 14 deletions.
6 changes: 0 additions & 6 deletions .github/.github/autolabeler.yml

This file was deleted.

14 changes: 14 additions & 0 deletions .github/file_labeler.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
sql:
- SQL/**/*.sql
mapping:
- _maps/**/*
config:
- config/**/*
tools:
- tools/**/*
sprites:
- icons/**/*.dmi
sound:
- sound/**/*
GitHub:
- .github/**/*
4 changes: 2 additions & 2 deletions .github/workflows/compile_changelogs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@ name: Compile changelogs

on:
schedule:
- cron: "*/15 * * * *"
- cron: "0 * * * *"
workflow_dispatch:

jobs:
CompileCL:
runs-on: ubuntu-latest
if: github.repository == 'BeeStation/BeeStation-Hornet'
steps:
- name: Checkout
uses: actions/checkout@v1
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
name: Run tests

on:
workflow_dispatch:
push:
Expand All @@ -10,6 +11,7 @@ on:
pull_request:
branches:
- master

jobs:
run_linters:
runs-on: ubuntu-latest
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/docker.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
name: Docker Image CI

on:
workflow_dispatch:
schedule:
- cron: 0 0 * * *

jobs:
build:
runs-on: ubuntu-latest
if: github.repository == 'BeeStation/BeeStation-Hornet'
steps:
- uses: actions/checkout@v2
- name: Publish to Registry
Expand Down
25 changes: 25 additions & 0 deletions .github/workflows/extra_pr_labels.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Add Extra PR labels

on:
push:
branches:
- master
pull_request_target:

jobs:
Label:
runs-on: ubuntu-latest
steps:
- name: Check for conflicting PRs
uses: eps1lon/actions-label-merge-conflict@releases/2.x
with:
dirtyLabel: "Merge Conflict"
repoToken: "${{ secrets.GITHUB_TOKEN }}"
commentOnDirty: "This pull request has conflicts, please resolve those before we can evaluate the pull request."
- name: Apply labels based on changed files
if: github.event_name != 'push'
uses: actions/labeler@main
with:
repo-token: "${{ secrets.GITHUB_TOKEN }}"
sync-labels: true
configuration-path: .github/file_labeler.yml
5 changes: 3 additions & 2 deletions .github/workflows/make_changelogs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,13 @@ name: Make changelogs

on:
push:
branches: [master]
branches:
- master

jobs:
MakeCL:
runs-on: ubuntu-latest
if: github.repository == 'BeeStation/BeeStation-Hornet' && !contains(github.event.head_commit.message, '[ci skip]')
if: "!contains(github.event.head_commit.message, '[ci skip]')"
steps:
- name: Checkout
uses: actions/checkout@v1
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/stale_issues.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ on:
jobs:
stale:
runs-on: ubuntu-latest
if: github.repository == 'BeeStation/BeeStation-Hornet'
steps:
- uses: actions/stale@v1
with:
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/stale_prs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ on:
jobs:
stale:
runs-on: ubuntu-latest
if: github.repository == 'BeeStation/BeeStation-Hornet'
steps:
- uses: actions/stale@v1
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/update_tgs_dmapi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ jobs:
destination_branch: "master"
pr_title: "Automatic TGS DMAPI Update"
pr_body: "This pull request updates the TGS DMAPI to the latest version. Please note any breaking or unimplemented changes before merging."
pr_label: "Tools"
pr_label: "tools"
pr_allow_empty: false
#github_token: ${{ secrets.GITHUB_TOKEN }} Use this instead if you have unprotected branches
github_token: ${{ secrets.CL_TOKEN }}

0 comments on commit 09d9910

Please sign in to comment.