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