Skip to content

Commit

Permalink
ci: open an issue if any release job fails (foundry-rs#5673)
Browse files Browse the repository at this point in the history
  • Loading branch information
DaniPopes authored and mikelodder7 committed Sep 12, 2023
1 parent 9da24fe commit f1d1509
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 16 deletions.
8 changes: 6 additions & 2 deletions .github/workflows/heavy-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,13 @@ jobs:
run: |
cargo nextest run -r -p forge --test cli --features heavy-integration-tests --retries 1 -E 'test(~heavy_integration)'
# If any of the steps fail, this will create a high-priority issue to signal so.
# If any of the jobs fail, this will create a high-priority issue to signal so.
issue:
name: Open an issue
runs-on: ubuntu-latest
if: ${{ failure() }}
steps:
- uses: JasonEtco/create-an-issue@v2
if: ${{ failure() }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
WORKFLOW_URL: |
Expand Down
34 changes: 20 additions & 14 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,8 @@ jobs:
PLATFORM_NAME: ${{ matrix.job.platform }}
TARGET: ${{ matrix.job.target }}
ARCH: ${{ matrix.job.arch }}
VERSION_NAME: ${{ (env.IS_NIGHTLY && 'nightly') || needs.prepare.outputs.tag_name }}
VERSION_NAME: |
${{ (env.IS_NIGHTLY && 'nightly') || needs.prepare.outputs.tag_name }}
run: |
if [ "$PLATFORM_NAME" == "linux" ]; then
tar -czvf "foundry_${VERSION_NAME}_${PLATFORM_NAME}_${ARCH}.tar.gz" -C ./target/${TARGET}/release forge cast anvil chisel
Expand All @@ -162,7 +163,8 @@ jobs:
env:
PLATFORM_NAME: ${{ matrix.job.platform }}
TARGET: ${{ matrix.job.target }}
VERSION_NAME: ${{ (env.IS_NIGHTLY && 'nightly') || needs.prepare.outputs.tag_name }}
VERSION_NAME: |
${{ (env.IS_NIGHTLY && 'nightly') || needs.prepare.outputs.tag_name }}
run: |
sudo apt-get -y install help2man
help2man -N ./target/${TARGET}/release/forge > forge.1
Expand Down Expand Up @@ -203,17 +205,6 @@ jobs:
${{ steps.artifacts.outputs.file_name }}
${{ steps.man.outputs.foundry_man }}
# If any of the steps fail, this will create a high-priority issue
# to signal so.
- uses: JasonEtco/create-an-issue@v2
if: ${{ failure() }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
WORKFLOW_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
with:
update_existing: true
filename: .github/RELEASE_FAILURE_ISSUE_TEMPLATE.md

cleanup:
name: Release cleanup
runs-on: ubuntu-20.04
Expand All @@ -236,4 +227,19 @@ jobs:
with:
script: |
const prunePrereleases = require('./.github/scripts/prune-prereleases.js')
await prunePrereleases({github, context})
await prunePrereleases({github, context})
# If any of the jobs fail, this will create a high-priority issue to signal so.
issue:
name: Open an issue
runs-on: ubuntu-latest
if: ${{ failure() }}
steps:
- uses: JasonEtco/create-an-issue@v2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
WORKFLOW_URL: |
${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
with:
update_existing: true
filename: .github/RELEASE_FAILURE_ISSUE_TEMPLATE.md

0 comments on commit f1d1509

Please sign in to comment.