mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-04-09 09:58:20 -05:00
github action improved tagging
This commit is contained in:
parent
29f73b2dbb
commit
52640f08d2
24
.github/workflows/docker.yml
vendored
24
.github/workflows/docker.yml
vendored
@ -1,32 +1,34 @@
|
|||||||
name: Docker
|
name: docker
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches: travis-multiarch-builds
|
branches:
|
||||||
|
- master
|
||||||
|
- dev
|
||||||
|
tags:
|
||||||
|
- 'ng-*'
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
# Build and push image to docker hub.
|
# build and push image to docker hub.
|
||||||
buildx:
|
buildx:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs: [tests, documentation, frontend]
|
|
||||||
if: github.ref == 'refs/heads/github-action-test'
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
|
|
||||||
- name: Prepare
|
- name: Prepare
|
||||||
id: prepare
|
id: prepare
|
||||||
|
env:
|
||||||
|
DOCKER_IMAGE: ${{ secrets.DOCKER_IMAGE }}
|
||||||
run: |
|
run: |
|
||||||
DOCKER_IMAGE=moztr/paperless-ng
|
|
||||||
DOCKER_PLATFORMS=linux/amd64,linux/arm/v7,linux/arm64/v8
|
DOCKER_PLATFORMS=linux/amd64,linux/arm/v7,linux/arm64/v8
|
||||||
VERSION=edge
|
VERSION=edge
|
||||||
if [[ $GITHUB_REF == refs/tags/* ]]; then
|
if [[ $GITHUB_REF == refs/tags/* ]]; then
|
||||||
VERSION=${GITHUB_REF#refs/tags/v}
|
VERSION=${GITHUB_REF#refs/tags/}
|
||||||
fi
|
fi
|
||||||
if [ "${{ github.event_name }}" = "schedule" ]; then
|
if [[ $GITHUB_REF == refs/heads/* ]]; then
|
||||||
VERSION=nightly
|
VERSION=${GITHUB_REF#refs/heads/}
|
||||||
fi
|
fi
|
||||||
TAGS="--tag ${DOCKER_IMAGE}:${VERSION}"
|
TAGS="--tag ${DOCKER_IMAGE}:${VERSION}"
|
||||||
if [[ $VERSION =~ ^[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}$ ]]; then
|
if [[ $VERSION == "master" ]]; then
|
||||||
TAGS="$TAGS --tag ${DOCKER_IMAGE}:latest"
|
TAGS="$TAGS --tag ${DOCKER_IMAGE}:latest"
|
||||||
fi
|
fi
|
||||||
echo ::set-output name=docker_image::${DOCKER_IMAGE}
|
echo ::set-output name=docker_image::${DOCKER_IMAGE}
|
||||||
|
1
.github/workflows/documentation.yml
vendored
1
.github/workflows/documentation.yml
vendored
@ -24,6 +24,7 @@ jobs:
|
|||||||
path: ${{ steps.pip-cache.outputs.dir }}
|
path: ${{ steps.pip-cache.outputs.dir }}
|
||||||
key: ${{ runner.os }}-pip3.6.8}
|
key: ${{ runner.os }}-pip3.6.8}
|
||||||
- name: dependencies
|
- name: dependencies
|
||||||
|
# instead of directly installing the dependency in the workflow file, can this be done using the pipfile instead?
|
||||||
run: |
|
run: |
|
||||||
pip install 'sphinx~=3.3' sphinx_rtd_theme
|
pip install 'sphinx~=3.3' sphinx_rtd_theme
|
||||||
- name: make
|
- name: make
|
||||||
|
2
.github/workflows/frontend.yml
vendored
2
.github/workflows/frontend.yml
vendored
@ -1,6 +1,6 @@
|
|||||||
name: frontend
|
name: frontend
|
||||||
|
|
||||||
# always run frontend workflow
|
# always run frontend workflow to see if it builds and tests run fine
|
||||||
on: push
|
on: push
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
4
.github/workflows/test.yml
vendored
4
.github/workflows/test.yml
vendored
@ -8,8 +8,8 @@ jobs:
|
|||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
os: [ubuntu-20.04]
|
os: ubuntu-20.04]
|
||||||
python:
|
python: # pyenv-action requires the exact version
|
||||||
- 3.6.8
|
- 3.6.8
|
||||||
- 3.7.9
|
- 3.7.9
|
||||||
- 3.8.6
|
- 3.8.6
|
||||||
|
Loading…
x
Reference in New Issue
Block a user