Skip to content

ubuntu_image_update #95

ubuntu_image_update

ubuntu_image_update #95

Workflow file for this run

name: build_ubuntu
on:
push:
branches:
- master
paths:
- user-entrypoint.sh
- Dockerfile
- .github/workflows/build_ubuntu.yml
pull_request:
branches:
- master
paths:
- user-entrypoint.sh
- Dockerfile
- .github/workflows/build_ubuntu.yml
repository_dispatch:
types:
- ubuntu_image_update
workflow_dispatch:
jobs:
docker:
runs-on: ubuntu-latest
permissions:
packages: write
env:
TITLE: User Ubuntu
strategy:
matrix:
include:
- base-image: ubuntu:20.04
platforms: |-
linux/amd64
linux/arm/v7
linux/arm64
linux/ppc64le
linux/s390x
tags: |-
ghcr.io/phasecorex/user-ubuntu:20.04
ghcr.io/phasecorex/user-ubuntu:focal
docker.io/phasecorex/user-ubuntu:20.04
docker.io/phasecorex/user-ubuntu:focal
cache-from: ghcr.io/phasecorex/user-ubuntu:20.04
- base-image: ubuntu:22.04
platforms: |-
linux/amd64
linux/arm/v7
linux/arm64
linux/ppc64le
linux/s390x
tags: |-
ghcr.io/phasecorex/user-ubuntu:22.04
ghcr.io/phasecorex/user-ubuntu:jammy
ghcr.io/phasecorex/user-ubuntu:latest
docker.io/phasecorex/user-ubuntu:22.04
docker.io/phasecorex/user-ubuntu:jammy
docker.io/phasecorex/user-ubuntu:latest
cache-from: ghcr.io/phasecorex/user-ubuntu:22.04
- base-image: ubuntu:24.04
platforms: |-
linux/amd64
linux/arm/v7
linux/arm64
linux/ppc64le
linux/s390x
tags: |-
ghcr.io/phasecorex/user-ubuntu:24.04
ghcr.io/phasecorex/user-ubuntu:noble
docker.io/phasecorex/user-ubuntu:24.04
docker.io/phasecorex/user-ubuntu:noble
cache-from: ghcr.io/phasecorex/user-ubuntu:24.04
fail-fast: false
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Docker meta
id: meta
uses: docker/metadata-action@v5
with:
images: phasecorex/user-ubuntu
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 }}