Skip to content
This repository has been archived by the owner on May 7, 2023. It is now read-only.

build(deps): bump docker/build-push-action from 3 to 4 #358

build(deps): bump docker/build-push-action from 3 to 4

build(deps): bump docker/build-push-action from 3 to 4 #358

Workflow file for this run

name: build & push docker images
on:
pull_request:
push:
schedule:
- cron: "0 0 * * *"
env:
DOCKERHUB_USERNAME: supersandro2000
GHCR_USERNAME: supersandro2000
permissions:
contents: read
packages: write
jobs:
lint:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Eval platforms
run: |
make hadolint shellcheck
buildx:
continue-on-error: true
runs-on: ubuntu-latest
strategy:
matrix:
include:
- image: base-alpine
platforms: amd64,arm/v7,arm64
version: 3.13
- image: base-alpine
platforms: amd64,arm/v7,arm64
version: 3.14
- image: base-alpine
platforms: amd64,arm/v7,arm64
version: 3.15
- image: base-alpine
platforms: amd64,arm/v7,arm64
tags: latest
version: edge
- image: c3d2-bullshit-bingo
platforms: amd64,arm/v7,arm64
tags: latest
- image: code-server
# deb file is amd64 only
platforms: amd64
tags: latest
version: 4.4.0
- image: code-server-extra
# deb file is amd64 only
platforms: amd64
tags: latest
version: 3
- image: firefly-iii
platforms: amd64,arm/v7,arm64
tags: latest
version: 5.7.5
- image: gitea-nginx
platforms: amd64,arm/v7,arm64
tags: latest
version: 1.16.7
- image: halcyon
platforms: amd64,arm/v7,arm64
tags: latest
version: 2.4.9
- image: healthchecks
# cryptography cannot be installed from wheel in arm/v7
platforms: amd64,arm64
tags: latest
version: 2.0.1
- image: images-weserv
platforms: amd64,arm/v7,arm64
tags: latest
version: api-5-nginx-1.21.6
- image: kibitzr
platforms: amd64,arm/v7,arm64
tags: latest
version: 6.2.1
- image: mastodon-nginx
platforms: amd64,arm64
tags: latest
version: 3.5.2
- image: musicbot
# openjdk jre is not available on arm/v7
platforms: amd64,arm64
tags: latest
version: 0.3.8
- image: prerenderer
# chromium is not available on arm/v7
platforms: amd64,arm64
tags: latest
- image: privatebin
platforms: amd64,arm/v7,arm64
tags: latest
version: 1.5.1
- image: reddiscord
platforms: amd64,arm/v7,arm64
tags: latest
version: 3.4.16
- image: screeenly
# chromium cannot be on arm/v7,arm64
platforms: amd64
tags: latest
- image: thelounge
platforms: amd64
tags: latest
- image: yourls
platforms: amd64,arm/v7,arm64
tags: latest
version: 1.8.2
- image: zeronet
platforms: amd64,arm/v7,arm64
tags: latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up QEMU for cross compile
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v2
with:
driver-opts: |
network=host
install: true
- name: Login to Docker Hub
uses: docker/login-action@v2
if: github.event_name != 'pull_request' && github.actor != 'dependabot[bot]'
with:
username: ${{ env.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Login to Github Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Eval platforms
run: |
set +e
dont_split_version="${{ matrix.dont_split_version }}"
tags="${{ matrix.tags }}"
version="${{ matrix.version }}"
[[ -z $dont_split_version ]] && versions="$(echo $version | cut -f1 -d".")$([[ ${version//[^.]} == . ]] && echo ,$version | awk -F '[.-]' '{print $1"."$2}')$([[ ${version//[^.]} == .. ]] && echo ,$version | awk -F '[.-]' '{print $1"."$2"."$3}'),$version"
echo "platforms=$(echo ${{ matrix.platforms }} | awk 'BEGIN{RS=","} {printf a"linux/"$i} {a=","}')" >> $GITHUB_ENV
echo "tags=$(echo -n $([[ -n $dont_split_version ]] && echo -n "$version" || ([[ -n $version ]] && echo -n "$versions"))$([[ -n $version && -n $tags ]] && echo -n ",")$([[ -n $tags ]] && echo -n "$tags") | awk 'BEGIN{RS=","} {printf a"${{ env.DOCKERHUB_USERNAME }}/${{ matrix.image }}:"$i",ghcr.io/${{ env.GHCR_USERNAME }}/${{ matrix.image }}:"$i} {a=","}')" >> $GITHUB_ENV
- name: Build and push
uses: docker/build-push-action@v4
with:
build-args: VERSION=${{ matrix.version }}
context: ${{ matrix.image }}
platforms: ${{ env.platforms }}
pull: true
push: ${{ github.event_name != 'pull_request' && github.actor != 'dependabot[bot]' }}
tags: ${{ env.tags }}