|
|
|
@ -39,9 +39,9 @@ jobs:
|
|
|
|
|
# Or if we are in a tagged release scenario.
|
|
|
|
|
if: ${{ github.event.workflow_run.conclusion == 'success' }} || ${{ github.event.release.tag_name }} != ''
|
|
|
|
|
steps:
|
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
|
- uses: actions/checkout@v4
|
|
|
|
|
- name: Set up Python 3.9
|
|
|
|
|
uses: actions/setup-python@v2
|
|
|
|
|
uses: actions/setup-python@v4
|
|
|
|
|
with:
|
|
|
|
|
python-version: 3.9
|
|
|
|
|
|
|
|
|
@ -58,27 +58,27 @@ jobs:
|
|
|
|
|
echo ${{ github.ref }} > changedetectionio/tag.txt
|
|
|
|
|
|
|
|
|
|
- name: Set up QEMU
|
|
|
|
|
uses: docker/setup-qemu-action@v1
|
|
|
|
|
uses: docker/setup-qemu-action@v3
|
|
|
|
|
with:
|
|
|
|
|
image: tonistiigi/binfmt:latest
|
|
|
|
|
platforms: all
|
|
|
|
|
|
|
|
|
|
- name: Login to GitHub Container Registry
|
|
|
|
|
uses: docker/login-action@v1
|
|
|
|
|
uses: docker/login-action@v3
|
|
|
|
|
with:
|
|
|
|
|
registry: ghcr.io
|
|
|
|
|
username: ${{ github.actor }}
|
|
|
|
|
password: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
|
|
|
|
|
|
- name: Login to Docker Hub Container Registry
|
|
|
|
|
uses: docker/login-action@v1
|
|
|
|
|
uses: docker/login-action@v3
|
|
|
|
|
with:
|
|
|
|
|
username: ${{ secrets.DOCKER_HUB_USERNAME }}
|
|
|
|
|
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
|
|
|
|
|
|
|
|
|
|
- name: Set up Docker Buildx
|
|
|
|
|
id: buildx
|
|
|
|
|
uses: docker/setup-buildx-action@v1
|
|
|
|
|
uses: docker/setup-buildx-action@v3
|
|
|
|
|
with:
|
|
|
|
|
install: true
|
|
|
|
|
version: latest
|
|
|
|
@ -88,7 +88,7 @@ jobs:
|
|
|
|
|
- name: Build and push :dev
|
|
|
|
|
id: docker_build
|
|
|
|
|
if: ${{ github.ref }} == "refs/heads/master"
|
|
|
|
|
uses: docker/build-push-action@v2
|
|
|
|
|
uses: docker/build-push-action@v5
|
|
|
|
|
with:
|
|
|
|
|
context: ./
|
|
|
|
|
file: ./Dockerfile
|
|
|
|
@ -105,7 +105,7 @@ jobs:
|
|
|
|
|
- name: Build and push :tag
|
|
|
|
|
id: docker_build_tag_release
|
|
|
|
|
if: github.event_name == 'release' && startsWith(github.event.release.tag_name, '0.')
|
|
|
|
|
uses: docker/build-push-action@v2
|
|
|
|
|
uses: docker/build-push-action@v5
|
|
|
|
|
with:
|
|
|
|
|
context: ./
|
|
|
|
|
file: ./Dockerfile
|
|
|
|
@ -125,7 +125,7 @@ jobs:
|
|
|
|
|
run: echo step SHA ${{ steps.vars.outputs.sha_short }} tag ${{steps.vars.outputs.tag}} branch ${{steps.vars.outputs.branch}} digest ${{ steps.docker_build.outputs.digest }}
|
|
|
|
|
|
|
|
|
|
- name: Cache Docker layers
|
|
|
|
|
uses: actions/cache@v2
|
|
|
|
|
uses: actions/cache@v3
|
|
|
|
|
with:
|
|
|
|
|
path: /tmp/.buildx-cache
|
|
|
|
|
key: ${{ runner.os }}-buildx-${{ github.sha }}
|
|
|
|
|