Skip to content

Bump actions/checkout from 3.5.3 to 4.1.0 #19

Bump actions/checkout from 3.5.3 to 4.1.0

Bump actions/checkout from 3.5.3 to 4.1.0 #19

Workflow file for this run

name: Docker
on:
push:
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
strategy:
fail-fast: false
matrix:
base:
- bash:alpine3.18
version:
- "1.0.0"
steps:
- name: Checkout
uses: actions/checkout@v4.1.0
- name: Configure
id: config
run: |-
NPROC=$(nproc)
echo "NPROC=$((NPROC*2+1))" >> $GITHUB_ENV
echo "NPROC=$((NPROC*2+1))" >> $GITHUB_OUTPUT
echo "image-owner=${{ github.repository_owner }}" >> $GITHUB_OUTPUT
echo "image-name=${GITHUB_REPOSITORY#*/docker-}" >> $GITHUB_OUTPUT
- name: Setup - QEMU
id: qemu
uses: docker/setup-qemu-action@v2.2.0
with:
platforms: linux/amd64,linux/arm64
- name: Setup - Docker buildx
uses: docker/setup-buildx-action@v2
- name: Setup - Docker Hub
uses: docker/login-action@v2.2.0
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Setup - Github Container Registry
uses: docker/login-action@v2.2.0
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ github.token }}
- name: Setup - Docker image metadata
id: meta
uses: docker/metadata-action@v4.6.0
with:
images: |-
${{ steps.config.outputs.image-owner }}/${{ steps.config.outputs.image-name }}
ghcr.io/${{ steps.config.outputs.image-owner }}/${{ steps.config.outputs.image-name }}
flavor: |-
latest=${{ !!matrix.latest }}
tags: |-
type=semver,pattern={{major}}.{{minor}},value=${{ matrix.version }}
- name: Build
uses: docker/build-push-action@v4.1.1
id: build
with:
context: .
build-args: |
base=${{ matrix.base }}
version=${{ matrix.version }}
push: true
platforms: ${{ steps.qemu.outputs.platforms }}
labels: ${{ steps.meta.outputs.labels }}
tags: ${{ steps.meta.outputs.tags }}
cache-from: type=gha
cache-to: type=gha,mode=max