From df64e8e92927cbc68597a443ada01a0d72c397ad Mon Sep 17 00:00:00 2001 From: "Mark A. Grondona" Date: Wed, 4 Oct 2023 07:42:17 -0700 Subject: [PATCH 1/3] ci: fix release creation on tag Problem: The flux-sched create-release action is not working. Update to softprops/action-gh-release like other flux-framework projects. This is a one-step release action instead of multi-step like the old GH release action (plus the Github action is deprecated) Fixes #1096 --- .github/workflows/main.yml | 28 ++++++++-------------------- 1 file changed, 8 insertions(+), 20 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 23a4c7aa3..f08541cce 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -147,24 +147,22 @@ jobs: env: ${{matrix.env}} run: src/test/docker-deploy.sh - # Prepare, create and deploy release on tag: - - name: prep release - id: prep_release - if: success() && matrix.create_release - env: ${{matrix.env}} - run: echo "::set-output name=tarball::$(echo flux-sched*.tar.gz)" - - name: create release id: create_release - if: success() && matrix.create_release + if: | + success() + && matrix.create_release + && github.repository == 'flux-framework/flux-sched' env: ${{matrix.env}} - uses: actions/create-release@v1 + uses: softprops/action-gh-release@v1 with: tag_name: ${{ matrix.tag }} - release_name: flux-sched ${{ matrix.tag }} + name: flux-sched ${{ matrix.tag }} prerelease: true + files: flux-sched*.tar.gz body: | View [Release Notes](https://github.com/${{ github.repository }}/blob/${{ matrix.tag }}/NEWS.md) for flux-sched ${{ matrix.tag }} + generate-manifest: name: Generate docker manifest runs-on: ubuntu-latest @@ -183,13 +181,3 @@ jobs: # maybe bring back later: fluxrm/flux-core:bookworm-386 docker manifest create fluxrm/flux-core:bookworm fluxrm/flux-core:bookworm-amd64 fluxrm/flux-core:bookworm-arm64 docker manifest push fluxrm/flux-core:bookworm - - - name: upload tarball - id: upload-tarball - if: success() && matrix.create_release - uses: actions/upload-release-asset@v1 - with: - upload_url: ${{ steps.create_release.outputs.upload_url }} - asset_path: ${{ steps.prep_release.outputs.tarball }} - asset_name: ${{ steps.prep_release.outputs.tarball }} - asset_content_type: "application/gzip" From 935f6e0b14b1e9d2f8d569eb71fdbafd536598a9 Mon Sep 17 00:00:00 2001 From: "Mark A. Grondona" Date: Wed, 4 Oct 2023 07:48:15 -0700 Subject: [PATCH 2/3] ci: use GITHUB_OUTPUT instead of set-output Problem: The ::set-output syntax in GitHub actions is deprecated. Switch to using the GITHUB_OUTPUT environment file for this purpose. --- .github/workflows/main.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index f08541cce..28d3beabb 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -67,11 +67,11 @@ jobs: ref: ${{ github.event.pull_request.head.sha }} fetch-depth: 0 - id: set-matrix - run: echo "::set-output name=matrix::$(src/test/generate-matrix.py)" + run: echo "matrix=$(src/test/generate-matrix.py)" >> $GITHUB_OUTPUT - run: src/test/generate-matrix.py | jq -S . - - run: echo "::set-output name=GITHUB_BRANCH::${GITHUB_REF#refs/heads}" - - run: echo "::set-output name=GITHUB_TAG::${GITHUB_REF#refs/tags}" - - run: echo "::set-output name=EVENT_NAME::${{github.event_name}}" + - run: echo "GITHUB_BRANCH=${GITHUB_REF#refs/heads}" >> $GITHUB_OUTPUT + - run: echo "GITHUB_TAG=${GITHUB_REF#refs/tags}" >> $GITHUB_OUTPUT + - run: echo "EVENT_NAME=${{github.event_name}}" >> $GITHUB_OUTPUT ci-checks: needs: [ generate-matrix ] From cecffd37ee22728d17e6d0e378f108d7177b746a Mon Sep 17 00:00:00 2001 From: "Mark A. Grondona" Date: Wed, 4 Oct 2023 08:26:46 -0700 Subject: [PATCH 3/3] ci: update deprecated actions Problem: checkout@v2 and setup-python@v1 are used in the flux-sched workflow, but both result in deprecation warnings due to their use of node12. Update the checkout action to v3 and setup-python to v4. --- .github/workflows/main.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 28d3beabb..bb0da18f1 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -27,10 +27,10 @@ jobs: name: python format runs-on: ubuntu-20.04 steps: - - uses: actions/setup-python@v1 + - uses: actions/setup-python@v4 with: python-version: 3.8 - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 with: ref: ${{ github.event.pull_request.head.sha }} fetch-depth: 0 @@ -43,10 +43,10 @@ jobs: name: python lint runs-on: ubuntu-20.04 steps: - - uses: actions/setup-python@v1 + - uses: actions/setup-python@v4 with: python-version: 3.8 - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 with: ref: ${{ github.event.pull_request.head.sha }} fetch-depth: 0 @@ -62,7 +62,7 @@ jobs: outputs: matrix: ${{ steps.set-matrix.outputs.matrix }} steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 with: ref: ${{ github.event.pull_request.head.sha }} fetch-depth: 0