Feature: Don't push feature development branches to DockerHub (#1219)

* Don't push to the DockerHub except for certain refs

* Enables deletetion of feature images

* Adds links to the API docs for the end points

* Makes it clear in the logs a dry-run vs actual deletion event
This commit is contained in:
Trenton Holmes
2022-07-11 12:22:43 -07:00
committed by GitHub
parent 0bb9d91eae
commit 5243ae80b4
4 changed files with 25 additions and 32 deletions

View File

@@ -135,12 +135,18 @@ jobs:
-
name: Check pushing to Docker Hub
id: docker-hub
# Only push to Dockerhub from the main repo
# Only push to Dockerhub from the main repo AND the ref is either:
# main
# dev
# beta
# a tag
# Otherwise forks would require a Docker Hub account and secrets setup
run: |
if [[ ${{ github.repository }} == "paperless-ngx/paperless-ngx" ]] ; then
if [[ ${{ github.repository }} == "paperless-ngx/paperless-ngx" && ( ${{ github.ref_name }} == "main" || ${{ github.ref_name }} == "dev" || ${{ github.ref_name }} == "beta" || ${{ startsWith(github.ref, 'refs/tags/v') }} == "true" ) ]] ; then
echo "Enabling DockerHub image push"
echo ::set-output name=enable::"true"
else
echo "Not pushing to DockerHub"
echo ::set-output name=enable::"false"
fi
-

View File

@@ -45,4 +45,4 @@ jobs:
-
name: Cleanup feature tags
run: |
python ${GITHUB_WORKSPACE}/.github/scripts/cleanup-tags.py --loglevel info
python ${GITHUB_WORKSPACE}/.github/scripts/cleanup-tags.py --loglevel info --delete