Skip to content

Commit

Permalink
Merge pull request #82 from FrangipaneTeam/ci
Browse files Browse the repository at this point in the history
ci: correct pr_size_labeler and add issue_labeler
  • Loading branch information
azrod authored Jan 13, 2023
2 parents 9a12719 + c84e203 commit ef675c3
Show file tree
Hide file tree
Showing 4 changed files with 55 additions and 29 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/issue_labeler.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Issue Labeler

on:
issues:
types: [opened]

jobs:
community-issue:
name: Label community issues
if: ${{ (github.event.issue.author_association != 'OWNER' &&
github.event.issue.author_association != 'MEMBER' &&
github.event.issue.author_association != 'CONTRIBUTOR' &&
github.event.issue.author_association != 'COLLABORATOR' ) }}
runs-on: ubuntu-22.04
permissions:
issues: write
steps:
- name: Label as community issue
if: ${{ !contains(github.event.issue.labels.*.name, 'community') }}
uses: actions/github-script@v6
with:
script: |
github.rest.issues.addLabels({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
labels: ["community"]
})
28 changes: 0 additions & 28 deletions .github/workflows/labeler.yml

This file was deleted.

25 changes: 25 additions & 0 deletions .github/workflows/pr_labeler.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Pull Request Labeler

on:
pull_request_target:
types: [ opened, edited, reopened, synchronize ]
paths-ignore:
- 'apis/**'
jobs:
labeler:
runs-on: ubuntu-latest
name: Label the PR size
steps:
- uses: codelytv/pr-size-labeler@v1
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
xs_label: 'size/XS'
xs_max_size: '10'
s_label: 'size/S'
s_max_size: '100'
m_label: 'size/M'
m_max_size: '500'
l_label: 'size/L'
l_max_size: '1000'
xl_label: 'size/XL'
fail_if_xl: 'false'
3 changes: 2 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ env:
jobs:
release_please:
name: Release Please
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
if: github.repository == 'FrangipaneTeam/provider-flexibleengine'
outputs:
release_created: ${{ steps.release.outputs.release_created }}
Expand All @@ -34,6 +34,7 @@ jobs:
bump-patch-for-minor-pre-major: true

publish-artifacts:
name: Publish Artifacts
runs-on: ubuntu-22.04
needs: release_please
if: ${{ needs.release_please.outputs.release_created == 'true' }}
Expand Down

0 comments on commit ef675c3

Please # to comment.