alpine_image_update #83
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: build_alpine | |
on: | |
push: | |
branches: | |
- master | |
paths: | |
- user-entrypoint.sh | |
- Dockerfile.alpine | |
- .github/workflows/build_alpine.yml | |
pull_request: | |
branches: | |
- master | |
paths: | |
- user-entrypoint.sh | |
- Dockerfile.alpine | |
- .github/workflows/build_alpine.yml | |
repository_dispatch: | |
types: | |
- alpine_image_update | |
jobs: | |
docker: | |
runs-on: ubuntu-latest | |
permissions: | |
packages: write | |
env: | |
TITLE: User Alpine | |
strategy: | |
matrix: | |
include: | |
- base-image: alpine:edge | |
dockerfile: Dockerfile.alpine | |
platforms: |- | |
linux/amd64 | |
linux/arm/v6 | |
linux/arm/v7 | |
linux/arm64 | |
linux/386 | |
linux/ppc64le | |
linux/s390x | |
tags: |- | |
ghcr.io/phasecorex/user-alpine:edge | |
docker.io/phasecorex/user-alpine:edge | |
cache-from: ghcr.io/phasecorex/user-alpine:edge | |
- base-image: alpine:3.18 | |
dockerfile: Dockerfile.alpine | |
platforms: |- | |
linux/amd64 | |
linux/arm/v6 | |
linux/arm/v7 | |
linux/arm64 | |
linux/386 | |
linux/ppc64le | |
linux/s390x | |
tags: |- | |
ghcr.io/phasecorex/user-alpine:3.18 | |
ghcr.io/phasecorex/user-alpine:latest | |
docker.io/phasecorex/user-alpine:3.18 | |
docker.io/phasecorex/user-alpine:latest | |
cache-from: ghcr.io/phasecorex/user-alpine:3.18 | |
- base-image: alpine:3.17 | |
dockerfile: Dockerfile.alpine | |
platforms: |- | |
linux/amd64 | |
linux/arm/v6 | |
linux/arm/v7 | |
linux/arm64 | |
linux/386 | |
linux/ppc64le | |
linux/s390x | |
tags: |- | |
ghcr.io/phasecorex/user-alpine:3.17 | |
docker.io/phasecorex/user-alpine:3.17 | |
cache-from: ghcr.io/phasecorex/user-alpine:3.17 | |
- base-image: alpine:3.16 | |
dockerfile: Dockerfile.alpine | |
platforms: |- | |
linux/amd64 | |
linux/arm/v6 | |
linux/arm/v7 | |
linux/arm64 | |
linux/386 | |
linux/ppc64le | |
linux/s390x | |
tags: |- | |
ghcr.io/phasecorex/user-alpine:3.16 | |
docker.io/phasecorex/user-alpine:3.16 | |
cache-from: ghcr.io/phasecorex/user-alpine:3.16 | |
- base-image: alpine:3.15 | |
dockerfile: Dockerfile.alpine | |
platforms: |- | |
linux/amd64 | |
linux/arm/v6 | |
linux/arm/v7 | |
linux/arm64 | |
linux/386 | |
linux/ppc64le | |
linux/s390x | |
tags: |- | |
ghcr.io/phasecorex/user-alpine:3.15 | |
docker.io/phasecorex/user-alpine:3.15 | |
cache-from: ghcr.io/phasecorex/user-alpine:3.15 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Docker meta | |
id: meta | |
uses: docker/metadata-action@v5 | |
with: | |
images: phasecorex/user-alpine | |
labels: | | |
maintainer=${{ github.repository_owner }} | |
org.opencontainers.image.vendor=${{ github.repository_owner }} | |
org.opencontainers.image.title=${{ env.TITLE }} | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v3 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Login to GitHub Container Registry | |
if: github.event_name != 'pull_request' | |
uses: docker/login-action@v3 | |
with: | |
registry: ghcr.io | |
username: ${{ github.repository_owner }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Login to DockerHub | |
if: github.event_name != 'pull_request' | |
uses: docker/login-action@v3 | |
with: | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- name: Build and push ${{ matrix.base-image }} | |
uses: docker/build-push-action@v5 | |
with: | |
context: . | |
file: ${{ matrix.dockerfile }} | |
platforms: ${{ matrix.platforms }} | |
push: ${{ github.event_name != 'pull_request' }} | |
tags: ${{ matrix.tags }} | |
cache-from: ${{ matrix.cache-from }} | |
build-args: | | |
BASE_IMG=${{ matrix.base-image }} | |
labels: ${{ steps.meta.outputs.labels }} |