diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-09 13:16:35 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-09 13:16:35 +0000 |
commit | e2bbf175a2184bd76f6c54ccf8456babeb1a46fc (patch) | |
tree | f0b76550d6e6f500ada964a3a4ee933a45e5a6f1 /.github/workflows | |
parent | Initial commit. (diff) | |
download | frr-e2bbf175a2184bd76f6c54ccf8456babeb1a46fc.tar.xz frr-e2bbf175a2184bd76f6c54ccf8456babeb1a46fc.zip |
Adding upstream version 9.1.upstream/9.1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '.github/workflows')
-rw-r--r-- | .github/workflows/base-branch-label.yml | 20 | ||||
-rw-r--r-- | .github/workflows/behind-base.yml | 28 | ||||
-rw-r--r-- | .github/workflows/commitlint.yml | 30 | ||||
-rw-r--r-- | .github/workflows/conflicts.yml | 22 | ||||
-rw-r--r-- | .github/workflows/docker-daily-master.yml | 53 | ||||
-rw-r--r-- | .github/workflows/freeze.yml | 17 | ||||
-rw-r--r-- | .github/workflows/mergifyio_backport.yml | 22 | ||||
-rw-r--r-- | .github/workflows/size-label.yml | 26 | ||||
-rw-r--r-- | .github/workflows/stale.yml | 29 |
9 files changed, 247 insertions, 0 deletions
diff --git a/.github/workflows/base-branch-label.yml b/.github/workflows/base-branch-label.yml new file mode 100644 index 0000000..5c5d829 --- /dev/null +++ b/.github/workflows/base-branch-label.yml @@ -0,0 +1,20 @@ +name: Add base branch label + +on: + pull_request_target: + types: + - opened + - reopened + +jobs: + label: + if: github.repository == 'frrouting/frr' + runs-on: ubuntu-latest + permissions: + contents: read + pull-requests: write + steps: + - uses: actions-ecosystem/action-add-labels@v1 + with: + labels: | + ${{ github.event.pull_request.base.ref }} diff --git a/.github/workflows/behind-base.yml b/.github/workflows/behind-base.yml new file mode 100644 index 0000000..16b6434 --- /dev/null +++ b/.github/workflows/behind-base.yml @@ -0,0 +1,28 @@ +name: Add rebase label if the branch is > 50 commits behind + +on: + pull_request_target: + types: [synchronize, opened, reopened, labeled, unlabeled] + +jobs: + behind: + if: github.repository == 'frrouting/frr' + runs-on: ubuntu-latest + permissions: + contents: read + pull-requests: write + steps: + - name: Checkout + uses: actions/checkout@v3 + with: + ref: ${{ github.event.pull_request.head.sha }} + fetch-depth: 0 + - name: Set custom variables + id: vars + run: | + echo "behind_by=$(git log --oneline origin/${{ github.base_ref }} ^${{ github.event.pull_request.head.sha }} | wc -l)" >> $GITHUB_OUTPUT + - name: Add rebase label if needed + if: ${{ steps.vars.outputs.behind_by > 50 }} + uses: actions-ecosystem/action-add-labels@v1 + with: + labels: rebase diff --git a/.github/workflows/commitlint.yml b/.github/workflows/commitlint.yml new file mode 100644 index 0000000..96cd118 --- /dev/null +++ b/.github/workflows/commitlint.yml @@ -0,0 +1,30 @@ +name: commitlint + +on: + pull_request: + types: + - opened + - reopened + - synchronize + - labeled + - unlabeled + +jobs: + commitlint: + if: ${{ github.repository == 'frrouting/frr' }} && ${{ github.base_ref == 'refs/heads/master' }} + name: Check if the commits meet the requirements of the guidelines + permissions: + contents: read + pull-requests: read + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v3 + with: + fetch-depth: 0 + + - name: Check Commit + uses: wagoid/commitlint-github-action@v5 + with: + configFile: .github/commitlint.config.js + helpURL: 'https://docs.frrouting.org/projects/dev-guide/en/latest/workflow.html#submitting-patches-and-enhancements' diff --git a/.github/workflows/conflicts.yml b/.github/workflows/conflicts.yml new file mode 100644 index 0000000..100f557 --- /dev/null +++ b/.github/workflows/conflicts.yml @@ -0,0 +1,22 @@ +name: Add a conflict label if PR needs to rebase + +on: + push: + pull_request_target: + types: [synchronize] + +jobs: + conflicts: + if: github.repository == 'frrouting/frr' + runs-on: ubuntu-latest + permissions: + contents: read + pull-requests: write + steps: + - name: Check if PRs need a rebase (have some conflicts) + uses: eps1lon/actions-label-merge-conflict@releases/2.x + with: + dirtyLabel: "conflicts" + removeOnDirtyLabel: "no_conflicts" + repoToken: "${{ secrets.GITHUB_TOKEN }}" + commentOnDirty: "This pull request has conflicts, please resolve those before we can evaluate the pull request." diff --git a/.github/workflows/docker-daily-master.yml b/.github/workflows/docker-daily-master.yml new file mode 100644 index 0000000..59787b4 --- /dev/null +++ b/.github/workflows/docker-daily-master.yml @@ -0,0 +1,53 @@ +name: Build daily 'master' images for Docker + +on: + schedule: + - cron: '59 23 * * *' + +concurrency: + group: ${{ github.ref }} + cancel-in-progress: true + +jobs: + docker_daily_master: + if: github.repository == 'frrouting/frr' + runs-on: ubuntu-latest + permissions: + contents: read + steps: + - name: Custom variables + id: vars + run: | + # To package a specific git commit, the date of the commit gets + # appended to the latest release, e.g. 1.0.0_git20180204. + # This is the requirement by APKBUILD (abuild). + # More details: https://wiki.alpinelinux.org/wiki/APKBUILD_Reference. + echo ::set-output name=date::$(date +'%Y%m%d') + + - name: Checkout + uses: actions/checkout@v3 + with: + ref: master + + - name: Set up QEMU + uses: docker/setup-qemu-action@v2 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v2 + + - name: Login to Docker Hub + uses: docker/login-action@v2 + with: + registry: quay.io + username: ${{ secrets.QUAY_USERNAME }} + password: ${{ secrets.QUAY_ROBOT_TOKEN }} + + - name: Build and push + uses: docker/build-push-action@v3 + with: + context: . + file: ./docker/alpine/Dockerfile + push: true + tags: quay.io/frrouting/frr:master + build-args: PKGVER=${{ steps.vars.outputs.date }} + platforms: linux/amd64,linux/arm64,linux/arm/v7 diff --git a/.github/workflows/freeze.yml b/.github/workflows/freeze.yml new file mode 100644 index 0000000..f3506d0 --- /dev/null +++ b/.github/workflows/freeze.yml @@ -0,0 +1,17 @@ +name: Warn before merging if a "freeze" label exists + +on: + pull_request_target: + types: [synchronize, opened, reopened, labeled, unlabeled] + +jobs: + freeze_warning: + if: ${{ contains(github.event.*.labels.*.name, 'freeze') }} + name: Warn before merging if a "freeze" label exists + runs-on: ubuntu-latest + steps: + - name: Check for "freeze" label + run: | + echo "Pull request is labeled as 'freeze'" + echo "This workflow fails so that the pull request cannot be merged." + exit 1 diff --git a/.github/workflows/mergifyio_backport.yml b/.github/workflows/mergifyio_backport.yml new file mode 100644 index 0000000..455dcbe --- /dev/null +++ b/.github/workflows/mergifyio_backport.yml @@ -0,0 +1,22 @@ +name: Mergifyio backport + +on: [issue_comment] + +jobs: + mergifyio_backport: + if: github.repository == 'frrouting/frr' + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + + - uses: actions-ecosystem/action-regex-match@v2 + id: regex-match + with: + text: ${{ github.event.comment.body }} + regex: '[Mm]ergifyio backport ' + + - uses: actions-ecosystem/action-add-labels@v1 + if: ${{ steps.regex-match.outputs.match != '' }} + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + labels: backport diff --git a/.github/workflows/size-label.yml b/.github/workflows/size-label.yml new file mode 100644 index 0000000..1ce0786 --- /dev/null +++ b/.github/workflows/size-label.yml @@ -0,0 +1,26 @@ +name: Add PRs size label + +on: pull_request_target + +jobs: + size-label: + if: github.repository == 'frrouting/frr' + runs-on: ubuntu-latest + permissions: + contents: read + pull-requests: write + steps: + - name: size-label + uses: "pascalgn/size-label-action@v0.4.2" + env: + GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" + with: + sizes: > + { + "0": "XS", + "20": "S", + "50": "M", + "200": "L", + "800": "XL", + "2000": "XXL" + } diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml new file mode 100644 index 0000000..cd1365b --- /dev/null +++ b/.github/workflows/stale.yml @@ -0,0 +1,29 @@ +name: Mark stale issues + +on: + workflow_dispatch: + schedule: + - cron: "30 1 * * *" + +permissions: + contents: read + +jobs: + stale: + if: github.repository == 'frrouting/frr' + permissions: + issues: write + pull-requests: write + runs-on: ubuntu-latest + steps: + - uses: actions/stale@v5 + with: + repo-token: ${{ secrets.GITHUB_TOKEN }} + stale-issue-message: 'This issue is stale because it has been open 180 days with no activity. Comment or remove the `autoclose` label in order to avoid having this issue closed.' + stale-issue-label: autoclose + stale-pr-message: 'This PR is stale because it has been open 180 days with no activity. Comment or remove the `autoclose` label in order to avoid having this PR closed.' + stale-pr-label: autoclose + days-before-stale: 180 + days-before-close: 194 + days-before-pr-stale: 180 + days-before-pr-close: 194 |