diff --git a/.github/workflows/beta-ci.yml b/.github/workflows/beta-ci.yml index 0e6d521dd..629fa9dc0 100644 --- a/.github/workflows/beta-ci.yml +++ b/.github/workflows/beta-ci.yml @@ -4,6 +4,10 @@ on: push: branches: - "v3-beta" + paths-ignore: + - "**.md" + - "**/.github/**" + - "**/.vscode/**" workflow_dispatch: {} permissions: @@ -15,8 +19,12 @@ env: IMAGE_NAME: wizarrrr/wizarr IMAGE_TAG: v3-beta +concurrency: + group: ${{ github.ref }} + cancel-in-progress: true + jobs: - clear: + before_build: runs-on: ubuntu-latest steps: # Clear the digests from the artifacts @@ -30,6 +38,8 @@ jobs: build_ghcr: name: Build Digest for GHCR runs-on: ubuntu-latest + needs: + - before_build strategy: fail-fast: false matrix: @@ -49,12 +59,6 @@ jobs: with: images: ${{ env.GHCR_REGISTRY }}/${{ env.IMAGE_NAME }}:${{ env.IMAGE_TAG }} - # Set up QEMU - # - name: Set up QEMU - # uses: docker/setup-qemu-action@v3 - # with: - # platforms: ${{ matrix.platform }} - # Set up Docker Buildx - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 @@ -154,6 +158,8 @@ jobs: build_dh: name: Build Digest for Docker Hub runs-on: ubuntu-latest + needs: + - before_build strategy: fail-fast: false matrix: @@ -173,12 +179,6 @@ jobs: with: images: ${{ env.DH_REGISTRY }}/${{ env.IMAGE_NAME }}:${{ env.IMAGE_TAG }} - # Set up QEMU - # - name: Set up QEMU - # uses: docker/setup-qemu-action@v3 - # with: - # platforms: ${{ matrix.platform }} - # Set up Docker Buildx - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index a79822bcb..bdd943953 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -15,7 +15,7 @@ env: IMAGE_TAG: latest jobs: - clear: + before_build: runs-on: ubuntu-latest steps: # Clear the digests from the artifacts @@ -26,68 +26,31 @@ jobs: digests_dh digests_ghcr - prerelease: - name: Check if release is not a pre-release - runs-on: ubuntu-latest - needs: - - clear - steps: - # If the release is a pre-release, succeed the job - - name: Check if release is not a pre-release + # Only run the workflow if the release is on the master branch + - name: Check if release is on master branch run: | - if [[ "${{ github.event.release.prerelease }}" == "true" ]]; then - echo "Release is a pre-release. Skipping." - exit 1 - else + if [ "${{ github.event.release.prerelease }}" != true ]; then echo "Release is not a pre-release. Continuing." + else + echo "Release is a pre-release. Skipping workflow." + exit 78 # Exit with a neutral exit code (78) to indicate a skipped workflow. fi - master_branch: - name: Check if release is on master branch - runs-on: ubuntu-latest - needs: - - prerelease - steps: - # If the release is not on the master branch, succeed the job + # Only run the workflow if the release is on the master branch - name: Check if release is on master branch run: | - if [[ "${{ github.event.release.target_commitish }}" != "master" ]]; then - echo "Release is not on master branch. Skipping." - exit 1 + if [ "${{ github.event.release.target_commitish }}" = "master" ]; then + echo "Release is on the master branch." else - echo "Release is on master branch. Continuing." + echo "Release is not on the master branch. Skipping workflow." + exit 78 # Exit with a neutral exit code (78) to indicate a skipped workflow. fi - update_latest: - runs-on: ubuntu-latest - needs: - - master_branch - permissions: - contents: write - steps: - # Checkout the repo and the translations branch - - name: Checkout - uses: actions/checkout@v2 - with: - ref: main - - # Update latest file with the new version number - - name: Update latest file - run: | - echo "${{ github.event.release.tag_name }}" > latest - - # Commit and push changes - - uses: stefanzweifel/git-auto-commit-action@v5 - with: - commit_message: "Update latest file" - file_pattern: "latest" - branch: main - build_ghcr: name: Build Digest for GHCR runs-on: ubuntu-latest needs: - - update_latest + - before_build strategy: fail-fast: false matrix: @@ -100,6 +63,11 @@ jobs: - name: Checkout uses: actions/checkout@v4 + # Set the latest tag to the release tag + - name: Set latest tag + run: | + echo "${{ github.event.release.tag_name }}" > latest + # Get the Metadata from the Docker Image - name: Docker meta id: meta @@ -202,7 +170,7 @@ jobs: name: Build Digest for Docker Hub runs-on: ubuntu-latest needs: - - update_latest + - before_build strategy: fail-fast: false matrix: @@ -215,6 +183,11 @@ jobs: - name: Checkout uses: actions/checkout@v4 + # Set the latest tag to the release tag + - name: Set latest tag + run: | + echo "${{ github.event.release.tag_name }}" > latest + # Get the Metadata from the Docker Image - name: Docker meta id: meta