Skip to content

chore(deps): update containerbase/internal-tools action to v1.21.7 #499

chore(deps): update containerbase/internal-tools action to v1.21.7

chore(deps): update containerbase/internal-tools action to v1.21.7 #499

Workflow file for this run

name: build
on:
push:
env:
OWNER: ${{ github.repository_owner }}
FILE: watchtower
IMAGE: ghcr.io/${{ github.repository_owner }}/watchtower
BUILDKIT_PROGRESS: plain
BUILDX_NO_DEFAULT_ATTESTATIONS: true
concurrency:
group: ${{ github.workflow }}-${{ github.event.number || github.ref }}
cancel-in-progress: true
permissions:
contents: read
packages: write
jobs:
windows:
runs-on: windows-${{ matrix.os }}
timeout-minutes: 60
strategy:
matrix:
os: [2019,2022]
env:
BASE: ${{ matrix.os }}
TAG: windows-${{ matrix.os }}
steps:
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
- name: Init
run: ./bin/init.sh
shell: bash
# ignore not yet existing images
- name: Fetch the docker images
run: |
docker pull ${{ env.IMAGE }}
docker pull ${{ env.IMAGE }}:${{ env.TAG }}
docker pull ${{ env.IMAGE }}:${{ env.VERSION }}-${{ env.TAG }}
continue-on-error: true
- name: Build the docker image
run: |
docker build \
-t ${{ env.IMAGE }}:${{ env.TAG }} \
-t ${{ env.IMAGE }}:${{ env.VERSION }}-${{ env.TAG }} \
--cache-from ${{ env.IMAGE }} \
--cache-from ${{ env.IMAGE }}:${{ env.TAG }} \
--cache-from ${{ env.IMAGE }}:${{ env.VERSION }}-${{ env.TAG }} \
-f Dockerfile.${{ env.BASE }} \
.
working-directory: ./windows
shell: bash
- name: Test run
run: docker-compose --file docker-compose.test.yml run sut
working-directory: ./windows
env:
IMAGE: ${{ env.IMAGE }}:${{ env.TAG }}
- name: Log into registry
if: github.ref == 'refs/heads/main'
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.repository_owner }} --password-stdin
- name: Publish the docker images
if: github.ref == 'refs/heads/main'
run: |
docker push ${{ env.IMAGE }}:${{ env.TAG }}
docker push ${{ env.IMAGE }}:${{ env.VERSION }}-${{ env.TAG }}
linux:
runs-on: ubuntu-latest
timeout-minutes: 30
env:
TAG: linux-amd64
steps:
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
- name: Init
run: ./bin/init.sh
shell: bash
- name: docker-config
uses: containerbase/internal-tools@106c1f868fadc445219fcb8fee8fb9b6d11a3aa2 # v1.21.7
with:
command: docker-config
- name: Build the Docker image
run: docker buildx bake test
- name: Test run
run: docker-compose --file docker-compose.test.yml run sut
working-directory: ./linux
env:
IMAGE: ${{ env.IMAGE }}:${{ env.TAG }}
- name: Log into registry
if: github.ref == 'refs/heads/main'
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.repository_owner }} --password-stdin
- name: Publish the Docker image
if: github.ref == 'refs/heads/main'
run: docker buildx bake build
multi-arch:
needs: [linux, windows]
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/main'
timeout-minutes: 30
steps:
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
- name: docker-config
uses: containerbase/internal-tools@106c1f868fadc445219fcb8fee8fb9b6d11a3aa2 # v1.21.7
with:
command: docker-config
- name: Log into registry
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.repository_owner }} --password-stdin
- name: Init
run: ./bin/init.sh
- name: Build the Docker multiarch manifest
run: |
docker manifest create ${{ env.IMAGE }} \
${{ env.IMAGE }}:linux-amd64 \
${{ env.IMAGE }}:windows-2019 \
${{ env.IMAGE }}:windows-2022
docker manifest create ${{ env.IMAGE }}:${{ env.VERSION }} \
${{ env.IMAGE }}:${{ env.VERSION }}-linux-amd64 \
${{ env.IMAGE }}:${{ env.VERSION }}-windows-2019 \
${{ env.IMAGE }}:${{ env.VERSION }}-windows-2022
- name: Publish the Docker multiarch manifest
run: |
docker manifest push ${{ env.IMAGE }}
docker manifest push ${{ env.IMAGE }}:${{ env.VERSION }}
- name: Inspect the Docker multiarch manifest
run: docker manifest inspect ${{ env.IMAGE }}
release:
needs: multi-arch
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/main'
permissions:
contents: write
steps:
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
- name: Init
run: ./bin/init.sh
- uses: ncipollo/release-action@a2e71bdd4e7dab70ca26a852f29600c98b33153e # v1.12.0
with:
allowUpdates: true
body: See https://github.com/containrrr/watchtower/releases/tag/v${{ env.VERSION }} for more changes
commit: ${{ github.sha }}
name: ${{ env.VERSION }}
tag: v${{ env.VERSION }}
token: ${{ secrets.GITHUB_TOKEN }}