diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index dbb9647f6..047630f47 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,11 +1,12 @@ name: build on: + release: + types: [created] push: branches: - main - tags: - - "v*" # Triggers on version tags like v1.0.0 + - stable pull_request: branches: - main @@ -99,7 +100,7 @@ jobs: - run: echo ${{ steps.vars.outputs.sha7 }} > ./out/sha7 - - uses: actions/upload-artifact@v2 + - uses: actions/upload-artifact@v4 with: name: fider-image path: out/ @@ -132,7 +133,7 @@ jobs: uses: actions/setup-node@v1 with: node-version: 22.x - - uses: actions/download-artifact@v2 + - uses: actions/download-artifact@v4 with: name: fider-image path: ./out @@ -186,7 +187,7 @@ jobs: uses: actions/setup-node@v1 with: node-version: 22.x - - uses: actions/download-artifact@v2 + - uses: actions/download-artifact@v4 with: name: fider-image path: ./out diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index fece0538f..829e16659 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -46,7 +46,7 @@ jobs: cache-to: type=gha,mode=max - name: build and push docker image (push branch) - if: ${{ github.event.workflow_run.event == 'push' && !startsWith(github.ref, 'refs/tags/') }} + if: ${{ github.event.workflow_run.event == 'push' }} uses: docker/build-push-action@v3 with: push: true @@ -58,13 +58,13 @@ jobs: cache-to: type=gha,mode=max - name: build and push docker image (push tag) - if: ${{ github.event.workflow_run.event == 'push' && startsWith(github.ref, 'refs/tags/') }} + if: ${{ github.event.workflow_run.event == 'release' }} uses: docker/build-push-action@v3 with: push: true context: . build-args: COMMITHASH=${{ github.event.workflow_run.head_sha }} platforms: linux/amd64,linux/arm64/v8 - tags: getfider/fider:${{ github.ref_name }} + tags: getfider/fider:${{ github.event.workflow_run.display_title }} cache-from: type=gha cache-to: type=gha,mode=max