From 26f3e8d8d648c381ead95356aa26a4a224ec29e8 Mon Sep 17 00:00:00 2001 From: Raimo Radczewski Date: Sat, 1 Jun 2024 01:00:24 +0200 Subject: [PATCH] chore: Remove unnecessary conditions and rules --- .github/workflows/build.yml | 6 +++--- .github/workflows/publish-website.yml | 7 ++----- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 1b56b61..b755963 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -48,7 +48,7 @@ jobs: - name: Create release id: release uses: softprops/action-gh-release@v1 - if: github.event_name == 'push' && github.ref == 'refs/heads/main' + if: github.ref == 'refs/heads/main' with: name: ${{ needs.generate-version.outputs.trunkver }} tag_name: ${{ needs.generate-version.outputs.trunkver }} @@ -81,13 +81,13 @@ jobs: uses: docker/build-push-action@ca052bb54ab0790a636c9b5f226502c73d547a25 with: context: . - push: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }} + push: ${{ github.ref == 'refs/heads/main' }} build-args: | VERSION=${{ needs.generate-version.outputs.trunkver }} tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} - name: Update the action.yml with the new image tag - if: github.event_name == 'push' && github.ref == 'refs/heads/main' + if: github.ref == 'refs/heads/main' run: | yq eval --inplace '.runs.image = "docker://ghcr.io/crftd-tech/trunkver:${{ needs.generate-version.outputs.trunkver }}"' action.yml git config --global user.email "bot@crftd.tech" diff --git a/.github/workflows/publish-website.yml b/.github/workflows/publish-website.yml index 645d886..879afc8 100644 --- a/.github/workflows/publish-website.yml +++ b/.github/workflows/publish-website.yml @@ -16,9 +16,6 @@ concurrency: jobs: build: - environment: - name: github-pages - url: ${{ steps.deployment.outputs.page_url }} runs-on: ubuntu-latest defaults: run: @@ -44,14 +41,14 @@ jobs: run: npm run build - name: Upload artifact - if: github.event_name == 'push' && github.ref == 'refs/heads/main' + if: github.ref == 'refs/heads/main' uses: actions/upload-pages-artifact@v3 with: path: "website/_site/" deploy: needs: [build] - if: github.event_name == 'push' && github.ref == 'refs/heads/main' + if: github.ref == 'refs/heads/main' permissions: contents: read pages: write