Skip to content

Commit

Permalink
Merge pull request #263 from Wizarrrr/v3-beta
Browse files Browse the repository at this point in the history
V3 beta
  • Loading branch information
Ashley Bailey authored Oct 19, 2023
2 parents e0d5fdd + 448ae54 commit 188bc67
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 64 deletions.
26 changes: 13 additions & 13 deletions .github/workflows/beta-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ on:
push:
branches:
- "v3-beta"
paths-ignore:
- "**.md"
- "**/.github/**"
- "**/.vscode/**"
workflow_dispatch: {}

permissions:
Expand All @@ -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
Expand All @@ -30,6 +38,8 @@ jobs:
build_ghcr:
name: Build Digest for GHCR
runs-on: ubuntu-latest
needs:
- before_build
strategy:
fail-fast: false
matrix:
Expand All @@ -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
Expand Down Expand Up @@ -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:
Expand All @@ -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
Expand Down
75 changes: 24 additions & 51 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ env:
IMAGE_TAG: latest

jobs:
clear:
before_build:
runs-on: ubuntu-latest
steps:
# Clear the digests from the artifacts
Expand All @@ -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:
Expand All @@ -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
Expand Down Expand Up @@ -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:
Expand All @@ -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
Expand Down

0 comments on commit 188bc67

Please sign in to comment.