Skip to content

gha: bump actions/checkout from 4.1.0 to 4.1.1 (#2437) #397

gha: bump actions/checkout from 4.1.0 to 4.1.1 (#2437)

gha: bump actions/checkout from 4.1.0 to 4.1.1 (#2437) #397

Workflow file for this run

name: pwru
on:
push:
branches:
- main
paths:
- pwru/*
- .github/workflows/pwru.yml
workflow_dispatch:
schedule:
- cron: "0 8 * * 1"
env:
BUILD_VERSION: "v1.0.3"
DOCKER_CLI_EXPERIMENTAL: enabled
REPOSITORY: ${{ github.actor }}/${{ github.workflow }}
permissions: read-all
jobs:
deploy:
strategy:
fail-fast: false
matrix:
distro: [ubuntu, alpine]
runs-on: ubuntu-22.04
permissions:
packages: write
steps:
- name: Harden Runner
uses: step-security/harden-runner@1b05615854632b887b69ae1be8cbefe72d3ae423 # v1
with:
disable-sudo: true
egress-policy: block
disable-telemetry: true
allowed-endpoints:
api.github.com:443
archive.ubuntu.com:80
auth.docker.io:443
dl-cdn.alpinelinux.org:443
ghcr.io:443
github.com:443
index.docker.io:443
ports.ubuntu.com:80
production.cloudflare.docker.com:443
registry-1.docker.io:443
security.ubuntu.com:80
- name: Source checkout
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v2.4.0
- name: Setup QEMU
id: qemu
uses: docker/setup-qemu-action@68827325e0b33c7199eb31dd4e31fbe9023e06e3 # v1.2.0
- name: Setup Buildx
id: buildx
uses: docker/setup-buildx-action@f95db51fddba0c2d1ec667646a06c2ce06100226 # v1
- name: Set Docker metadata
id: docker_meta
uses: docker/metadata-action@96383f45573cb7f253c731d3b3ab81c87ef81934 # v3
with:
images: ${{ env.REPOSITORY }}
labels: |
org.opencontainers.image.version=${{ env.BUILD_VERSION }}
org.opencontainers.image.revision=${{ github.sha }}
org.opencontainers.image.title=${{ env.REPOSITORY }}
- name: GitHub login
if: ${{ github.event_name != 'pull_request' }}
uses: docker/login-action@343f7c4344506bcbf9b4de18042ae17996df046d # v1.12.0
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: DockerHub login
if: ${{ github.event_name != 'pull_request' }}
uses: docker/login-action@343f7c4344506bcbf9b4de18042ae17996df046d # v1.12.0
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}
- name: Build and push (Ubuntu)
if: ${{ matrix.distro == 'ubuntu' }}
uses: docker/build-push-action@0565240e2d4ab88bba5387d719585280857ece09 # v2.8.0
with:
push: ${{ github.event_name != 'pull_request' }}
context: ${{ github.workflow }}
file: ${{ github.workflow }}/Dockerfile
#platforms: linux/amd64,linux/arm64,linux/ppc64le,linux/arm/v7
platforms: linux/amd64,linux/arm64
#platforms: linux/amd64,linux/arm64,linux/arm/v7
build-args: BUILD_VERSION
cache-from: type=gha, scope=${{ github.workflow }}-${{ matrix.distro }}
cache-to: type=gha, scope=${{ github.workflow }}-${{ matrix.distro }}
labels: ${{ steps.docker_meta.outputs.labels }}
tags: |
docker.io/${{ env.REPOSITORY }}:${{ env.BUILD_VERSION }}
docker.io/${{ env.REPOSITORY }}:${{ env.BUILD_VERSION }}-${{ matrix.distro }}
docker.io/${{ env.REPOSITORY }}:latest
ghcr.io/${{ env.REPOSITORY }}:${{ env.BUILD_VERSION }}
ghcr.io/${{ env.REPOSITORY }}:${{ env.BUILD_VERSION }}-${{ matrix.distro }}
ghcr.io/${{ env.REPOSITORY }}:latest
- name: Build and push (Alpine)
if: ${{ matrix.distro == 'alpine' }}
uses: docker/build-push-action@0565240e2d4ab88bba5387d719585280857ece09 # v2.8.0
with:
push: ${{ github.event_name != 'pull_request' }}
context: ${{ github.workflow }}
file: ${{ github.workflow }}/Dockerfile.${{ matrix.distro }}
#platforms: linux/amd64,linux/arm64,linux/ppc64le,linux/arm/v7
#platforms: linux/amd64
#platforms: linux/amd64,linux/arm64,linux/ppc64le
platforms: linux/amd64,linux/arm64
#platforms: linux/amd64,linux/386,linux/arm64,linux/arm/v7,linux/arm/v6,linux/ppc64le
build-args: |
BUILD_VERSION
sbom: true
provenance: true
cache-from: type=gha, scope=${{ github.workflow }}-${{ matrix.distro }}
cache-to: type=gha, scope=${{ github.workflow }}-${{ matrix.distro }}
labels: ${{ steps.docker_meta.outputs.labels }}
tags: |
docker.io/${{ env.REPOSITORY }}:${{ env.BUILD_VERSION }}-${{ matrix.distro }}
ghcr.io/${{ env.REPOSITORY }}:${{ env.BUILD_VERSION }}-${{ matrix.distro }}