Skip to content

Commit 71c15b9

Browse files
alejandrohdezmaactions-user
authored andcommitted
Update files from .github to v0.8.0 [skip ci]
1 parent 6fda41f commit 71c15b9

13 files changed

+106
-344
lines changed

.github/labels.yml

-52
This file was deleted.

.github/pr-labeler.yml

+3-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,9 @@
33
# If you want to suggest a change, please open a PR or issue in that repository
44

55
enhancement: ['enhancement/*', 'feature/*']
6-
documentation: ['docs/*', '.docs/*', 'doc/*']
6+
documentation: ['docs/*', 'doc/*']
7+
breaking-change: ['breaking/*', 'break/*']
78
bug: ['bug/*', 'fix/*']
89
tests: ['test/*', 'tests/*']
910
dependency-update: ['dep/*', 'dependency/*', 'dependency-update/*']
11+
scala-steward: ['update/*']

.github/workflows/bot-prs-auto-approve.yml

-17
This file was deleted.

.github/workflows/changelog.yml

-72
This file was deleted.

.github/workflows/ci.yml

+29-35
Original file line numberDiff line numberDiff line change
@@ -11,48 +11,42 @@ on:
1111

1212
jobs:
1313
test:
14+
if: "!contains(github.event.head_commit.message, 'skip ci')"
1415
runs-on: ubuntu-latest
15-
env:
16-
GITHUB_TOKEN: ${{ secrets.ADMIN_GITHUB_TOKEN }}
17-
REQUIRES_JEKYLL_CI: ${{secrets.REQUIRES_JEKYLL_CI}}
18-
REQUIRES_CODECOV: ${{secrets.REQUIRES_CODECOV}}
1916
steps:
2017
- name: Checkout project
2118
uses: actions/checkout@v2
2219
with:
23-
fetch-depth: 0
24-
- name: Fetch tags
25-
run: git fetch --tags
26-
- name: Set up Ruby 2.6
27-
uses: actions/setup-ruby@v1
28-
with:
29-
ruby-version: 2.6
30-
- name: Set up jekyll
31-
if: env.REQUIRES_JEKYLL_CI != null
32-
run: |
33-
gem install jekyll -v 4
34-
- name: Set up codecov
35-
if: env.REQUIRES_CODECOV != null
36-
run: |
37-
curl -s https://codecov.io/bash > .codecov
38-
chmod +x .codecov
20+
ref: ${{ github.head_ref }}
21+
- name: Label PR
22+
if: github.event_name == 'pull_request'
23+
uses: TimonVS/pr-labeler-action@v3
24+
env:
25+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3926
- name: Setup Scala
4027
uses: olafurpg/setup-scala@v7
41-
- name: Cache dependencies
42-
uses: actions/cache@v1
43-
with:
44-
path: ~/.cache/coursier/v1
45-
key: ${{ runner.os }}-coursier-${{ hashFiles('build.sbt') }}-${{ hashFiles('project/*.scala') }}
46-
restore-keys: ${{ runner.os }}-coursier-
47-
- name: Cache .sbt
48-
uses: actions/cache@v1
28+
- name: Setup Ruby
29+
uses: actions/setup-ruby@v1
30+
- name: Setup yq
31+
run: sudo snap install yq
32+
- name: Run pre-conditions
33+
run: test -f .github/actions.yml && eval "$(yq r .github/actions.yml -D "true" pre.ci)" || true
34+
- name: Run scalafmt on Scala Steward PRs
35+
if: github.event.pull_request.user.login == '47erbot' && contains(github.event.pull_request.body, 'Scala Steward')
36+
run: sbt "scalafixEnable; fix" || sbt "scalafmtAll; scalafmtSbt" || true
37+
- name: Push changes
38+
uses: stefanzweifel/[email protected]
4939
with:
50-
path: ~/.sbt
51-
key: ${{ runner.os }}-sbt-${{ hashFiles('build.sbt') }}-${{ hashFiles('project/*.scala') }}
52-
restore-keys: ${{ runner.os }}-sbt-
40+
commit_message: Run formatter/linter
5341
- name: Run checks
5442
run: sbt ci-test
55-
- name: Upload codecov reports
56-
if: env.REQUIRES_CODECOV != null
57-
run: |
58-
./.codecov -X gcov
43+
env:
44+
GITHUB_TOKEN: ${{ secrets.ADMIN_GITHUB_TOKEN }}
45+
- name: Run post-conditions
46+
run: test -f .github/actions.yml && eval "$(yq r .github/actions.yml -D "true" post.ci)" || true
47+
- name: Automerge Scala Steward PRs
48+
if: success() && github.event_name == 'pull_request' && contains(github.event.pull_request.body, 'Scala Steward')
49+
uses: ridedott/[email protected]
50+
with:
51+
GITHUB_LOGIN: 47erbot
52+
GITHUB_TOKEN: ${{ secrets.ADMIN_GITHUB_TOKEN }}

.github/workflows/docs.yml

+53-26
Original file line numberDiff line numberDiff line change
@@ -5,47 +5,74 @@
55
name: Update documentation
66

77
on:
8-
push:
9-
branches: master
10-
tags: v**
8+
release:
9+
types: [published]
10+
repository_dispatch:
11+
types: [docs]
1112

1213
jobs:
1314
documentation:
15+
if: "!contains(github.event.head_commit.message, 'skip ci')"
1416
runs-on: ubuntu-latest
15-
env:
16-
GITHUB_TOKEN: ${{ secrets.ADMIN_GITHUB_TOKEN }}
1717
steps:
1818
- name: Checkout project
1919
uses: actions/checkout@v2
2020
with:
21+
token: ${{ secrets.ADMIN_GITHUB_TOKEN }}
2122
ref: master
22-
fetch-depth: 0
2323
- name: Fetch tags
2424
run: git fetch --tags
2525
- name: Setup Scala
2626
uses: olafurpg/setup-scala@v7
27-
- name: Cache dependencies
28-
uses: actions/cache@v1
29-
with:
30-
path: ~/.cache/coursier/v1
31-
key: ${{ runner.os }}-coursier-${{ hashFiles('build.sbt') }}-${{ hashFiles('project/*.scala') }}
32-
restore-keys: ${{ runner.os }}-coursier-
33-
- name: Cache .sbt
34-
uses: actions/cache@v1
35-
with:
36-
path: ~/.sbt
37-
key: ${{ runner.os }}-sbt-${{ hashFiles('build.sbt') }}-${{ hashFiles('project/*.scala') }}
38-
restore-keys: ${{ runner.os }}-sbt-
27+
- name: Setup Ruby
28+
uses: actions/setup-ruby@v1
29+
- name: Setup github-changelog-generator
30+
run: gem install github_changelog_generator -v 1.15.0
31+
- name: Setup yq
32+
run: sudo snap install yq
33+
- name: Run pre-conditions
34+
run: test -f .github/actions.yml && eval "$(yq r .github/actions.yml -D "true" pre.docs)" || true
3935
- name: Generate documentation
4036
run: sbt ci-docs
4137
env:
38+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4239
DOWNLOAD_INFO_FROM_GITHUB: true
43-
- name: Create Documentation Pull Request
44-
uses: peter-evans/create-pull-request@v2
40+
- name: Run post-conditions
41+
run: test -f .github/actions.yml && eval "$(yq r .github/actions.yml -D "true" post.docs)" || true
42+
- name: Generate changelog
43+
env:
44+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
45+
repo: ${{ github.repository }}
46+
run: |
47+
github_changelog_generator \
48+
--user ${repo%/*} \
49+
--project ${repo#*/} \
50+
--token $GITHUB_TOKEN \
51+
--exclude-labels "duplicate,question,invalid,wontfix,auto-update,auto-changelog,auto-documentation" \
52+
--configure-sections \
53+
'{
54+
"breaking": {
55+
"prefix": "⚠️ **Breaking changes**",
56+
"labels": ["breaking-change"]
57+
},
58+
"enhancement": {
59+
"prefix": "🚀 **Features**",
60+
"labels": ["enhancement"]
61+
},
62+
"documentation": {
63+
"prefix": "📘 **Documentation**",
64+
"labels": ["documentation"]
65+
},
66+
"bug": {
67+
"prefix": "🐛 **Bug Fixes**",
68+
"labels": ["bug"]
69+
},
70+
"dependency": {
71+
"prefix": "📈 **Dependency updates**",
72+
"labels": ["dependency-update", "scala-steward"]
73+
}
74+
}'
75+
- name: Push changes
76+
uses: stefanzweifel/[email protected]
4577
with:
46-
token: ${{ secrets.ADMIN_GITHUB_TOKEN }}
47-
commit-message: Update documentation and other files
48-
title: 'Update documentation and other files'
49-
labels: auto-documentation
50-
branch: auto-update-docs
51-
body: Update documentation and other files with latest changes.
78+
commit_message: 'Update documentation, changelog and other files [skip ci]'

.github/workflows/pr-labeler.yml

-17
This file was deleted.

0 commit comments

Comments
 (0)