Feel++ Env [jammy/linux/amd64,linux/arm64] #136
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: Feel++ Env | |
run-name: "Feel++ Env [${{ inputs.dist }}/${{ inputs.platforms }}]" | |
on: | |
push: | |
branches: | |
- master | |
paths: | |
- 'feelpp-env/**' | |
- '.github/workflows/feelpp-env.yml' | |
workflow_dispatch: | |
inputs: | |
dist: | |
description: 'Distribution codename' | |
required: true | |
default: 'jammy' | |
type: string | |
flavor: | |
description: 'Flavor of the distribution' | |
required: true | |
default: 'ubuntu' | |
type: string | |
version: | |
description: 'Version of the distribution' | |
required: true | |
default: '22.04' | |
type: string | |
dockerfile: | |
description: 'Dockerfile to use' | |
required: false | |
default: 'Dockerfile' | |
type: string | |
platforms: | |
description: 'Platforms to build' | |
required: false | |
default: 'linux/amd64,linux/arm64' | |
type: string | |
jobs: | |
activate: | |
runs-on: ubuntu-latest | |
if: | | |
github.repository == 'feelpp/docker' && | |
!startsWith(github.event.head_commit.message, 'Release ') && | |
!contains(github.event.head_commit.message, 'ci skip') | |
steps: | |
- run: echo ok go | |
all_images: | |
if: ${{ github.event_name == 'push' && !contains(github.event.head_commit.message, 'all skip') }} | |
strategy: | |
fail-fast: true | |
max-parallel: 4 | |
matrix: | |
include: | |
- {service: feelpp-env, dist: focal, flavor: ubuntu, version: "20.04", tag: ubuntu-20.04, experimental: false, platforms: "linux/amd64", dockerfile: Dockerfile } | |
- {service: feelpp-env, dist: mantic, flavor: ubuntu, version: "23.10", tag: ubuntu-23.10, experimental: false, platforms: "linux/amd64", dockerfile: Dockerfile } | |
- {service: feelpp-env, dist: jammy, flavor: ubuntu, version: "22.04", tag: ubuntu-22.04, experimental: false, platforms: "linux/amd64,linux/arm64", dockerfile: Dockerfile } | |
- {service: feelpp-env, dist: noble, flavor: ubuntu, version: "24.04", tag: ubuntu-24.04, experimental: true, platforms: "linux/amd64,linux/arm64", dockerfile: Dockerfile } | |
# - {service: feelpp-env, dist: buster, flavor: debian, version: 10, tag: debian-10, experimental: false, platforms: "linux/amd64,linux/arm64", dockerfile: Dockerfile } | |
# - {service: feelpp-env, dist: bullseye, flavor: debian, version: "11", tag: debian-11, experimental: false, platforms: "linux/amd64,linux/arm64", dockerfile: Dockerfile } | |
- {service: feelpp-env, dist: bookworm, flavor: debian, version: "12", tag: debian-12, experimental: false, platforms: "linux/amd64,linux/arm64", dockerfile: Dockerfile } | |
- {service: feelpp-env, dist: debian-testing, flavor: debian, version: "testing", tag: debian-testing, experimental: true, platforms: "linux/amd64", dockerfile: Dockerfile } | |
- {service: feelpp-env, dist: debian-sid, flavor: debian, version: "sid", tag: debian-sid, experimental: true, platforms: "linux/amd64,linux/arm64", dockerfile: Dockerfile } | |
- {service: feelpp-env, dist: fedora-39, flavor: fedora, version: "39", tag: fedora-39, experimental: false, platforms: "linux/amd64", dockerfile: Dockerfile } | |
runs-on: self-docker | |
needs: activate | |
name: ${{ matrix.flavor }}-${{ matrix.version }} | |
continue-on-error: ${{ matrix.experimental }} | |
steps: | |
- uses: actions/[email protected] | |
with: | |
# lfs: true | |
token: ${{ secrets.CR_PAT }} | |
submodules: recursive | |
- name: generate | |
run: | | |
bash mkimg.sh -f ${{ matrix.flavor }}:${{ matrix.version }} -t feelpp/${{ matrix.service }}:${{ matrix.tag }} -- | |
echo "context=feelpp-env/$(bash mkimg.sh -f ${{ matrix.flavor }}:${{ matrix.version }} -t feelpp/${{ matrix.service }}:${{ matrix.tag }} --)" >> $GITHUB_OUTPUT | |
ls -lrt | |
id: generate | |
working-directory: feelpp-env | |
- | |
name: Set up QEMU | |
uses: docker/setup-qemu-action@v2 | |
- | |
name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v2 | |
- | |
name: Login to GitHub Container Registry | |
uses: docker/login-action@v2 | |
with: | |
registry: ghcr.io | |
username: ${{ github.repository_owner }} | |
password: ${{ secrets.CR_PAT }} | |
- | |
name: Build ${{ matrix.service }}:${{ matrix.tag }} | |
uses: docker/build-push-action@v3 | |
with: | |
context: ./${{ steps.generate.outputs.context }} | |
tags: ghcr.io/feelpp/${{ matrix.service }}:${{ matrix.tag }} | |
file: ./${{ steps.generate.outputs.context }}/${{ matrix.dockerfile }} | |
push: ${{ github.event_name != 'pull_request' }} | |
platforms: ${{ matrix.platforms }} | |
- | |
name: Trigger build runner:${{ matrix.tag }} | |
uses: peter-evans/repository-dispatch@v2 | |
with: | |
token: ${{ secrets.CR_PAT }} | |
repository: feelpp/runners | |
event-type: runner-update-baseimage | |
client-payload: '{"flavor":"${{ matrix.flavor }}","version":"${{ matrix.version }}"}' | |
one_image: | |
if: ${{ github.event_name == 'workflow_dispatch' }} | |
runs-on: self-docker | |
needs: activate | |
name: ${{ inputs.dist }} | |
env: | |
tag: ${{ inputs.flavor }}-${{ inputs.version }} | |
service: feelpp-env | |
steps: | |
- uses: actions/[email protected] | |
with: | |
# lfs: true | |
token: ${{ secrets.CR_PAT }} | |
submodules: recursive | |
- name: generate | |
run: | | |
bash mkimg.sh -f ${{ inputs.flavor }}:${{ inputs.version }} -t feelpp/${{ env.service }}:${{ env.tag }} -- | |
echo "context=feelpp-env/$(bash mkimg.sh -f ${{ inputs.flavor }}:${{ inputs.version }} -t feelpp/${{ env.service }}:${{ env.tag }} --)" >> $GITHUB_OUTPUT | |
ls -lrt | |
id: generate | |
working-directory: feelpp-env | |
- | |
name: Set up QEMU | |
uses: docker/setup-qemu-action@v2 | |
- | |
name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v2 | |
- | |
name: Login to GitHub Container Registry | |
uses: docker/login-action@v2 | |
with: | |
registry: ghcr.io | |
username: ${{ github.repository_owner }} | |
password: ${{ secrets.CR_PAT }} | |
- | |
name: Build ${{ env.service }}:${{ env.tag }} | |
uses: docker/build-push-action@v3 | |
with: | |
context: ./${{ steps.generate.outputs.context }} | |
tags: ghcr.io/feelpp/${{ env.service }}:${{ env.tag }} | |
file: ./${{ steps.generate.outputs.context }}/${{ inputs.dockerfile }} | |
push: ${{ github.event_name != 'pull_request' }} | |
platforms: ${{ inputs.platforms }} | |
- | |
name: Trigger build runner:${{ env.tag }} | |
uses: peter-evans/repository-dispatch@v2 | |
with: | |
token: ${{ secrets.CR_PAT }} | |
repository: feelpp/runners | |
event-type: runner-update-baseimage | |
client-payload: '{"flavor":"${{ inputs.flavor }}","version":"${{ inputs.version }}"}' |