Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .github/labeler.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
changelog-updated:
- CHANGELOG.md

msrv-updated:
- .github/assets/msrv-badge.svg
65 changes: 0 additions & 65 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,71 +38,6 @@ jobs:
- uses: Swatinem/rust-cache@v1
- name: cargo check - ${{ matrix.cargo_checks.name }}
run: cargo ${{ matrix.cargo_checks.subcommand }}
#generate_changelog:
# name: Generate changelog
# runs-on: ubuntu-latest
# steps:
# - name: Checkout
# uses: actions/checkout@v2
# with:
# fetch-depth: 0
# - name: Install Rust
# uses: actions-rs/toolchain@v1
# with:
# toolchain: stable
# profile: minimal
# override: true
# - uses: Swatinem/rust-cache@v1
# with:
# key: changelog
# - name: Generate a changelog
# uses: orhun/git-cliff-action@v1
# id: git-cliff
# with:
# config: cliff.toml
# args: --verbose
# env:
# OUTPUT: CHANGELOG-generated.md
# - name: Print the changelog
# run: cat "${{ steps.git-cliff.outputs.changelog }}"
# - name: Upload generated CHANGELOG
# uses: actions/upload-artifact@v2
# with:
# name: CHANGELOG-generated
# path: CHANGELOG-generated.md
# retention-days: 1

#commit_changelog:
# name: Commit changelog
# #if: github.event_name == 'push' && github.ref == 'refs/heads/staging'
# needs:
# - ci
# - generate_changelog
# runs-on: ubuntu-latest
# steps:
# - name: Checkout
# uses: actions/checkout@v2
# with:
# fetch-depth: 0
# - name: Git branch name
# id: git-branch-name
# uses: EthanSK/git-branch-name-action@v1
# - name: Echo the branch name
# run: echo "Branch name ${GIT_BRANCH_NAME}"
# - name: Download generated CHANGELOG
# uses: actions/download-artifact@v2
# with:
# name: CHANGELOG-generated
# path: /tmp
# - name: Copy over changelog
# run: cp /tmp/CHANGELOG-generated.md CHANGELOG.md
# - uses: EndBug/add-and-commit@v9
# with:
# add: CHANGELOG.md
# new_branch: ${{ env.GIT_BRANCH_NAME }}
# #new_branch: staging
# default_author: github_actions
# message: "[skip ci] Update CHANGELOG from Github Actions"

update-project-stuff:
if: github.event_name == 'push' && github.ref == 'refs/heads/staging'
Expand Down
15 changes: 13 additions & 2 deletions .github/workflows/lint_pr.yml → .github/workflows/triage_pr.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: "Lint PR"
name: "Triage PR"

on:
pull_request_target:
Expand All @@ -8,7 +8,7 @@ on:
- synchronize

jobs:
main:
validate_pr_title:
name: Validate PR title
runs-on: ubuntu-latest
steps:
Expand All @@ -19,3 +19,14 @@ jobs:
ignoreLabels: |
bot-updated
ignore-semantic-pull-request
label_pr:
name: Label Pull Request
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: write
steps:
- uses: actions/labeler@v4
with:
repo-token: "${{ secrets.GITHUB_TOKEN }}"
sync-labels: true
15 changes: 6 additions & 9 deletions .github/workflows/update-repo-stuff.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ env:
CHANGELOG_FILENAME: CHANGELOG.md
DEFAULT_BRANCH: main
ADD_PR_LABELS: bot-updated
RESTART_PR_DELAY: 15s
RESTART_PR_DELAY: 30s
GIT_BOT_USERNAME: github-actions[bot]
GIT_BOT_EMAIL: github-actions[bot]@users.noreply.github.com

Expand Down Expand Up @@ -169,7 +169,7 @@ jobs:
needs:
- bot-label-check
- get_pr_info
if: ${{ needs.bot-label-check.outputs.label-exists }}
if: ${{ ! needs.bot-label-check.outputs.label-exists }}
steps:
- name: Checkout
uses: actions/checkout@v3
Expand Down Expand Up @@ -222,7 +222,7 @@ jobs:
name: Generate Minimum Supported Rust Version badge
#if: github.event_name == 'push' && github.ref == 'refs/heads/staging'
needs: bot-label-check
if: ${{ needs.bot-label-check.outputs.label-exists }}
if: ${{ ! needs.bot-label-check.outputs.label-exists }}
runs-on: ubuntu-latest
steps:
- name: Checkout
Expand All @@ -237,13 +237,11 @@ jobs:
- name: Install cargo-msrv
run: cargo install cargo-msrv

# I took this from entrypoint.sh
# from spenserblack/actions-msrv@v0.2
- name: Get Minimum Supported Rust Version
id: get-msrv
timeout-minutes: 60
timeout-minutes: 10
run: |
MSRV_RESULT=$(cargo msrv --path $1 --output-format json | tail -1)
MSRV_RESULT=$(cargo msrv --output-format json | tail -1)
MSRV=$(echo $MSRV_RESULT | jq -r '.msrv')
echo "::set-output name=msrv::$MSRV"

Expand All @@ -263,7 +261,7 @@ jobs:
- generate_changelog
- generate_msrv
- bot-label-check
if: ${{ needs.bot-label-check.outputs.label-exists }}
if: ${{ ! needs.bot-label-check.outputs.label-exists }}
permissions:
contents: write
pull-requests: write
Expand Down Expand Up @@ -326,7 +324,6 @@ jobs:
env:
GH_TOKEN: ${{ steps.app.outputs.token }}
run: |

printf "Changelog and/or MSRV badge was updated.\n\nBors will cancel job, but no action is required. Job will be restarted." | gh pr comment ${{ needs.get_pr_info.outputs.pr_number }} --body-file -
sleep ${{ env.RESTART_PR_DELAY }}
gh pr edit ${{ needs.get_pr_info.outputs.pr_number }} --add-label ${{ env.ADD_PR_LABELS }}
Expand Down