Skip to content

Commit

Permalink
chore: Remove unnecessary conditions and rules
Browse files Browse the repository at this point in the history
  • Loading branch information
rradczewski committed May 31, 2024
1 parent 8473735 commit 26f3e8d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 8 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down Expand Up @@ -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"
Expand Down
7 changes: 2 additions & 5 deletions .github/workflows/publish-website.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,6 @@ concurrency:

jobs:
build:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
defaults:
run:
Expand All @@ -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
Expand Down

0 comments on commit 26f3e8d

Please sign in to comment.