diff --git a/.github/workflows/neofs.yml b/.github/workflows/neofs.yml index 23b29b0..87f8f05 100644 --- a/.github/workflows/neofs.yml +++ b/.github/workflows/neofs.yml @@ -3,6 +3,9 @@ on: push: branches: [ master ] +env: + LATEST_PDF_FILE_NAME: 'neofs-spec-latest.pdf' + jobs: push-to-neofs: runs-on: ubuntu-latest @@ -20,6 +23,10 @@ jobs: - name: Get pdf file run: make docker/pdf + - name: Create latest spec file + run: | + cp output/${{ env.PDF_FILE_NAME }} output/${{ env.LATEST_PDF_FILE_NAME }} + - name: Publish to NeoFS id: publish_spec_pdf_to_neofs uses: nspcc-dev/gh-push-to-neofs@v0.1.2 @@ -31,14 +38,26 @@ jobs: STORE_OBJECTS_CID: ${{ vars.STORE_OBJECTS_CID }} PATH_TO_FILES_DIR: output - - name: Post the link to the spec + - name: Post the link to the current spec env: CONTAINER_URL: ${{ steps.publish_spec_pdf_to_neofs.outputs.OUTPUT_CONTAINER_URL }} SPEC_FILE: ${{ env.PDF_FILE_NAME }} uses: Sibz/github-status-action@v1 with: authToken: ${{secrets.GITHUB_TOKEN}} - context: 'Neofs spec pdf' + context: 'Neofs current spec pdf' + state: 'success' + sha: ${{github.event.pull_request.head.sha || github.sha}} + target_url: ${{ env.CONTAINER_URL }}${{ env.SPEC_FILE }} + + - name: Post the link to the latest spec + env: + CONTAINER_URL: ${{ steps.publish_spec_pdf_to_neofs.outputs.OUTPUT_CONTAINER_URL }} + SPEC_FILE: ${{ env.LATEST_PDF_FILE_NAME }} + uses: Sibz/github-status-action@v1 + with: + authToken: ${{secrets.GITHUB_TOKEN}} + context: 'Neofs latest spec pdf' state: 'success' sha: ${{github.event.pull_request.head.sha || github.sha}} - target_url: ${{ env.CONTAINER_URL }}/${{ env.SPEC_FILE }} + target_url: ${{ env.CONTAINER_URL }}${{ env.SPEC_FILE }}