diff --git a/.github/workflows/ghcr.yml b/.github/workflows/ghcr.yml index 49993d6cb..0a039a801 100644 --- a/.github/workflows/ghcr.yml +++ b/.github/workflows/ghcr.yml @@ -13,7 +13,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - docker: [ {name: 'scratch', sfx: ''}, {name: 'cuda', sfx: '-cuda'}, {name: 'alpine', sfx: '-alpine'} ] + docker: [ {name: 'latest', sfx: ''}, {name: 'cuda', sfx: '-cuda'}, {name: 'alpine', sfx: '-alpine'} ] permissions: contents: read packages: write @@ -60,10 +60,11 @@ jobs: with: images: ghcr.io/${{ github.repository }} tags: | - type=semver,pattern=v{{version}}${{ matrix.docker.sfx }} - type=semver,pattern={{version}}${{ matrix.docker.sfx }} - type=semver,pattern={{major}}.{{minor}}${{ matrix.docker.sfx }} - type=semver,pattern={{major}}${{ matrix.docker.sfx }} + type=semver,priority=1010,pattern=${{ matrix.docker.name }} + type=semver,priority=1009,pattern={{major}}${{ matrix.docker.sfx }} + type=semver,priority=1008,pattern={{major}}.{{minor}}${{ matrix.docker.sfx }} + type=semver,priority=1007,pattern={{version}}${{ matrix.docker.sfx }} + type=semver,priority=1006,pattern=v{{version}}${{ matrix.docker.sfx }} type=ref,enable=true,event=branch,suffix=${{ matrix.docker.sfx }} # Build and push Docker image with Buildx diff --git a/init/docker/Dockerfile.scratch b/init/docker/Dockerfile.latest similarity index 100% rename from init/docker/Dockerfile.scratch rename to init/docker/Dockerfile.latest diff --git a/init/docker/makedocker.sh b/init/docker/makedocker.sh index 4a3f2938f..7c58ef1de 100755 --- a/init/docker/makedocker.sh +++ b/init/docker/makedocker.sh @@ -17,4 +17,4 @@ docker buildx build --load --pull --tag notifiarr \ --build-arg "VENDOR=${VENDOR}" \ --build-arg "AUTHOR=${MAINT}" \ --build-arg "SOURCE_URL=${SOURCE_URL}" \ - --file init/docker/Dockerfile.scratch . + --file init/docker/Dockerfile.latest . diff --git a/settings.sh b/settings.sh index a768e919b..6cece1c54 100644 --- a/settings.sh +++ b/settings.sh @@ -29,4 +29,4 @@ fi [ -n "$DOCKER_TAG" ] || export DOCKER_TAG=$(echo $SOURCE_BRANCH | sed 's/^v*\([0-9].*\)/\1/') [ -n "$DOCKER_REPO" ] || export DOCKER_REPO="golift/notifiarr" [ -n "$IMAGE_NAME" ] || export IMAGE_NAME="${DOCKER_REPO}:${DOCKER_TAG}" -[ -n "$DOCKERFILE_PATH" ] || export DOCKERFILE_PATH="init/docker/Dockerfile.scratch" +[ -n "$DOCKERFILE_PATH" ] || export DOCKERFILE_PATH="init/docker/Dockerfile.latest"