Skip to content

A community-supported supercharged document management system: scan, index and archive all your documents

fix up CI/CD: build docker image on tags, correct docker image version, correct release tag

jonaswinkler014859185c96
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 309b4688c..43fc3efa1 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -205,7 +205,7 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
- tag_name: ${{ steps.get_version.outputs.version }}
+ tag_name: ng-${{ steps.get_version.outputs.version }}
release_name: Paperless-ng ${{ steps.get_version.outputs.version }}
draft: false
prerelease: true
@@ -225,7 +225,7 @@ jobs:
# build and push image to docker hub.
build-docker-image:
- if: github.event_name == 'push' && (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/dev' || github.ref == 'refs/tags/ng-*')
+ if: github.event_name == 'push' && (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/dev' || startsWith(github.ref, 'refs/tags/ng-'))
runs-on: ubuntu-latest
needs: [frontend, tests]
steps:
@@ -236,8 +236,9 @@ jobs:
VERSION=edge
if [[ $GITHUB_REF == refs/tags/ng-* ]]; then
VERSION=${GITHUB_REF#refs/tags/ng-}
- fi
- if [[ $GITHUB_REF == refs/heads/* ]]; then
+ elif [[ $GITHUB_REF == refs/heads/master ]]; then
+ VERSION=latest
+ elif [[ $GITHUB_REF == refs/heads/* ]]; then
VERSION=${GITHUB_REF#refs/heads/}
fi
echo ::set-output name=version::${VERSION}