diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml deleted file mode 100644 index 3f547cb..0000000 --- a/.github/FUNDING.yml +++ /dev/null @@ -1 +0,0 @@ -github: Xithrius diff --git a/.github/dependabot.yml b/.github/dependabot.yml index c918b33..973ac41 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -1,8 +1,12 @@ version: 2 updates: - - package-ecosystem: cargo + - package-ecosystem: "cargo" directory: "/" schedule: - interval: weekly - open-pull-requests-limit: 5 + interval: "weekly" + + - package-ecosystem: "github-actions" + directory: "/" + schedule: + interval: "weekly" diff --git a/.github/workflows/audit.yml b/.github/workflows/audit.yml deleted file mode 100644 index cf968d9..0000000 --- a/.github/workflows/audit.yml +++ /dev/null @@ -1,20 +0,0 @@ -name: Audit - -on: - workflow_dispatch: - schedule: - - cron: "0 0 * * 1" - -jobs: - audit: - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v3 - - uses: actions-rs/install@master - with: - crate: cargo-audit - - - uses: actions-rs/audit-check@v1 - with: - token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b34271d..446924f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -32,7 +32,7 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Install Rust toolchain uses: actions-rs/toolchain@v1 @@ -67,7 +67,7 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Install Rust run: | @@ -81,25 +81,3 @@ jobs: - name: Check code for possible improvements run: cargo clippy -- -D warnings - - # Prepare the Pull Request Payload artifact. If this fails, we - # we fail silently using the `continue-on-error` option. It's - # nice if this succeeds, but if it fails for any reason, it - # does not mean that our lint-test checks failed. - - name: Prepare Pull Request Payload artifact - id: prepare-artifact - if: always() && github.event_name == 'pull_request' - continue-on-error: true - run: cat $GITHUB_EVENT_PATH | jq '.pull_request' > pull_request_payload.json - - # This only makes sense if the previous step succeeded. To - # get the original outcome of the previous step before the - # `continue-on-error` conclusion is applied, we use the - # `.outcome` value. This step also fails silently. - - name: Upload a Build Artifact - if: always() && steps.prepare-artifact.outcome == 'success' - continue-on-error: true - uses: actions/upload-artifact@v2 - with: - name: pull-request-payload - path: pull_request_payload.json diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 0c67d9d..bac0cb3 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -10,7 +10,7 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - run: cargo login ${CRATES_IO_TOKEN} env: diff --git a/.github/workflows/status_embed.yml b/.github/workflows/status_embed.yml deleted file mode 100644 index 169775e..0000000 --- a/.github/workflows/status_embed.yml +++ /dev/null @@ -1,72 +0,0 @@ -name: Status Embed - -on: - workflow_run: - workflows: - - CI - types: - - completed - -jobs: - status_embed: - # We send the embed in the following situations: - # - Always after the `CI` workflow, as it runs at the - # end of our workflow sequence regardless of status. - # - Always for the `pull_request` event, as it only - # runs one workflow. - # - Always run for non-success workflows, as they - # terminate the workflow sequence. - if: >- - (github.event.workflow_run.name == 'CI' && github.event.workflow_run.conclusion != 'skipped') || - github.event.workflow_run.event == 'pull_request' || - github.event.workflow_run.conclusion == 'failure' || - github.event.workflow_run.conclusion == 'cancelled' - name: Send Status Embed to Discord - runs-on: ubuntu-latest - - steps: - # A workflow_run event does not contain all the information - # we need for a PR embed. That's why we upload an artifact - # with that information in the Lint workflow. - - name: Get Pull Request Information - id: pr_info - if: github.event.workflow_run.event == 'pull_request' - run: | - curl -s -H "Authorization: token $GITHUB_TOKEN" ${{ github.event.workflow_run.artifacts_url }} > artifacts.json - DOWNLOAD_URL=$(cat artifacts.json | jq -r '.artifacts[] | select(.name == "pull-request-payload") | .archive_download_url') - [ -z "$DOWNLOAD_URL" ] && exit 1 - wget --quiet --header="Authorization: token $GITHUB_TOKEN" -O pull_request_payload.zip $DOWNLOAD_URL || exit 2 - unzip -p pull_request_payload.zip > pull_request_payload.json - [ -s pull_request_payload.json ] || exit 3 - echo "::set-output name=pr_author_login::$(jq -r '.user.login // empty' pull_request_payload.json)" - echo "::set-output name=pr_number::$(jq -r '.number // empty' pull_request_payload.json)" - echo "::set-output name=pr_title::$(jq -r '.title // empty' pull_request_payload.json)" - echo "::set-output name=pr_source::$(jq -r '.head.label // empty' pull_request_payload.json)" - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - # Send an informational status embed to Discord instead of the - # standard embeds that Discord sends. This embed will contain - # more information and we can fine tune when we actually want - # to send an embed. - - name: GitHub Actions Status Embed for Discord - uses: SebastiaanZ/github-status-embed-for-discord@main - with: - # Our GitHub Actions webhook - webhook_id: ${{ secrets.DISCORD_WEBHOOK_ID }} - webhook_token: ${{ secrets.DISCORD_WEBHOOK_TOKEN }} - - # Workflow information - workflow_name: ${{ github.event.workflow_run.name }} - run_id: ${{ github.event.workflow_run.id }} - run_number: ${{ github.event.workflow_run.run_number }} - status: ${{ github.event.workflow_run.conclusion }} - actor: ${{ github.actor }} - repository: ${{ github.repository }} - ref: ${{ github.ref }} - sha: ${{ github.event.workflow_run.head_sha }} - - pr_author_login: ${{ steps.pr_info.outputs.pr_author_login }} - pr_number: ${{ steps.pr_info.outputs.pr_number }} - pr_title: ${{ steps.pr_info.outputs.pr_title }} - pr_source: ${{ steps.pr_info.outputs.pr_source }}