forked from netgroup/rose-srv6-tutorial
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request netgroup#27 from netgroup/add-more-github-actions
Add several GitHub actions
- Loading branch information
Showing
12 changed files
with
253 additions
and
94 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
- regExp: ".*\\.ts+$" | ||
labels: ["typescript"] | ||
- regExp: ".*\\.sql+$" | ||
labels: ["database", "critical"] | ||
- regExp: ".*/docs/" | ||
labels: ["documentation"] | ||
- regExp: ".*\\.png+$" | ||
labels: ["images"] | ||
- regExp: "^(pom\\.xml|package\\.json|build\\.gradle)$" | ||
labels: ["dependencies"] | ||
- regExp: ".*/requirements.txt" | ||
labels: ["dependencies"] | ||
- regExp: ".*\\.(zip|jar|war|ear)+$" | ||
labels: ["artifact", "invalid"] | ||
- regExp: ".*/setup.py" | ||
labels: ["build"] | ||
- regExp: "^.github/" | ||
labels: ["github-workflow"] | ||
- regExp: "^nets/8r-1c-in-band-isis/" | ||
labels: ["topology/8r-1c-in-band-isis"] | ||
- regExp: "^nets/8routers-isis-ipv6/" | ||
labels: ["topology/8routers-isis-ipv6"] | ||
- regExp: "^nets-unmantained/8r-1c-out-band-isis/" | ||
labels: ["topology/8r-1c-out-band-isis"] | ||
- regExp: "^nets-unmantained/3routers/" | ||
labels: ["topology/3routers"] | ||
- regExp: "^nets-unmantained/8routers/" | ||
labels: ["topology/8routers"] | ||
- regExp: "^nets-in-progress/8r-1c-srv6-pm/" | ||
labels: ["topology/8r-1c-srv6-pm"] | ||
- regExp: ".*/.env" | ||
labels: ["configuration"] |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
feature: ['feature/*', 'feat/*', 'feature-*', 'feat-*'] | ||
bug: ['fix/*', 'fix-*'] | ||
chore: ['chore/*', 'chore-*'] |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
name-template: 'v$RESOLVED_VERSION 🌈' | ||
tag-template: 'v$RESOLVED_VERSION' | ||
categories: | ||
- title: '🚀 Features' | ||
labels: | ||
- 'feature' | ||
- 'enhancement' | ||
- title: '🐛 Bug Fixes' | ||
labels: | ||
- 'fix' | ||
- 'bugfix' | ||
- 'bug' | ||
- title: '🧰 Maintenance' | ||
label: 'chore' | ||
change-template: '- $TITLE @$AUTHOR (#$NUMBER)' | ||
version-resolver: | ||
major: | ||
labels: | ||
- 'major' | ||
minor: | ||
labels: | ||
- 'minor' | ||
- 'feature' | ||
- 'enhancement' | ||
patch: | ||
labels: | ||
- 'patch' | ||
- 'fix' | ||
- 'bugfix' | ||
- 'bug' | ||
default: patch | ||
exclude-labels: | ||
- 'skip-changelog' | ||
template: | | ||
## Changes | ||
$CHANGES |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
name: autopep8 | ||
on: pull_request | ||
jobs: | ||
autopep8: | ||
# Check if the PR is not raised by this workflow and is not from a fork | ||
if: startsWith(github.head_ref, 'autopep8-patches') == false && github.event.pull_request.head.repo.full_name == github.repository | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Set up Python 3 | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: 3 | ||
- name: Checkout Code | ||
uses: actions/checkout@v2 | ||
with: | ||
ref: ${{ github.head_ref }} | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install setuptools wheel flake8 pytest | ||
- name: autopep8 | ||
id: autopep8 | ||
uses: peter-evans/autopep8@v1 | ||
with: | ||
args: --exit-code --recursive --in-place --aggressive --aggressive . | ||
- name: Set autopep8 branch name | ||
id: vars | ||
run: echo ::set-output name=branch-name::"autopep8-patches/$GITHUB_HEAD_REF" | ||
- name: Create Pull Request | ||
if: steps.autopep8.outputs.exit-code == 2 | ||
uses: peter-evans/create-pull-request@v2 | ||
with: | ||
commit-message: autopep8 action fixes | ||
committer: Carmine Scarpitta <carmine.scarpitta@uniroma2.it> | ||
title: Fixes by autopep8 action | ||
body: This is an auto-generated PR with fixes by autopep8. | ||
labels: autopep8, automated pr | ||
reviewers: cscarpitta | ||
branch: ${{ steps.vars.outputs.branch-name }} | ||
- name: Fail if autopep8 made changes | ||
if: steps.autopep8.outputs.exit-code == 2 | ||
run: exit 1 |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# Workflow to associate labels automatically | ||
name: labeler | ||
|
||
# Trigger the workflow on pull request events | ||
on: [pull_request] | ||
|
||
jobs: | ||
label: | ||
runs-on: ubuntu-latest | ||
steps: | ||
# We need to checkout the repository to access the configured file (.github/label-pr.yml) | ||
- uses: actions/checkout@v2 | ||
- name: Labeler | ||
uses: docker://decathlon/pull-request-labeler-action:2.0.0 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
# Here we can override the path for the action configuration. If none is provided, default one is `.github/label-pr.yml` | ||
# CONFIG_PATH: ${{ secrets.GITHUB_WORKSPACE }}/.github/label-pr.yml | ||
|
||
pr-labeler: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: TimonVS/pr-labeler-action@v3 | ||
# with: | ||
# configuration-path: .github/pr-labeler.yml # optional, .github/pr-labeler.yml is the default value | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
name: Release Drafter | ||
|
||
on: | ||
push: | ||
# branches to consider in the event; optional, defaults to all | ||
branches: | ||
- master | ||
|
||
jobs: | ||
update_release_draft: | ||
runs-on: ubuntu-latest | ||
steps: | ||
# Drafts your next Release notes as Pull Requests are merged into "master" | ||
- uses: release-drafter/release-drafter@v5 | ||
# with: | ||
# (Optional) specify config name to use, relative to .github/. Default: release-drafter.yml | ||
# config-name: my-config.yml | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.