All checks were successful
Container Publish / on-success-skip (push) Has been skipped
Container Publish / build-image (arm64) (push) Successful in 1m11s
Container Publish / build-image (amd64) (push) Successful in 2m56s
Container Publish / update docker manifest (push) Successful in 20s
Vulnerability Scan / Daily Vulnerability Scan (arm64) (push) Successful in 5s
Vulnerability Scan / Daily Vulnerability Scan (amd64) (push) Successful in 2m55s
97 lines
3.1 KiB
YAML
97 lines
3.1 KiB
YAML
---
|
|
name: Container Publish
|
|
|
|
env:
|
|
REGISTRY: docker.asperti.com
|
|
REPOSITORY: paspo/glpi
|
|
|
|
on:
|
|
push:
|
|
schedule:
|
|
- cron: "0 12 * * 3"
|
|
workflow_dispatch:
|
|
workflow_call:
|
|
workflow_run:
|
|
workflows: [vulnscan.yaml]
|
|
types: [completed]
|
|
|
|
jobs:
|
|
on-success-skip:
|
|
runs-on:
|
|
labels: ubuntu-latest
|
|
if: ${{ github.event.workflow_run.conclusion == 'success' }}
|
|
steps:
|
|
- run: exit_with_success
|
|
|
|
build-image:
|
|
runs-on:
|
|
labels: [ubuntu-latest, "arch-${{ matrix.arch }}"]
|
|
container:
|
|
image: catthehacker/ubuntu:act-latest
|
|
strategy:
|
|
matrix:
|
|
arch: [amd64, arm64]
|
|
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Login to registry
|
|
uses: docker/login-action@v3
|
|
with:
|
|
registry: ${{ env.REGISTRY }}
|
|
username: ${{ secrets.REGISTRY_USER }}
|
|
password: ${{ secrets.REGISTRY_TOKEN }}
|
|
|
|
- name: Build and publish
|
|
run: |
|
|
cd src && \
|
|
docker build \
|
|
--tag ${{ env.REGISTRY }}/${{ env.REPOSITORY }}:latest-${{ matrix.arch }} \
|
|
--tag ${{ env.REGISTRY }}/${{ env.REPOSITORY }}:11-${{ matrix.arch }} \
|
|
--tag ${{ env.REGISTRY }}/${{ env.REPOSITORY }}:11.0.1-${{ matrix.arch }} \
|
|
--build-arg "GLPI_VERSION=11.0.1" \
|
|
--build-arg "ALPINE_VERSION=3.22" \
|
|
--platform linux/${{ matrix.arch }} --no-cache -f Dockerfile .
|
|
docker push ${{ env.REGISTRY }}/${{ env.REPOSITORY }}:latest-${{ matrix.arch }}
|
|
docker push ${{ env.REGISTRY }}/${{ env.REPOSITORY }}:11-${{ matrix.arch }}
|
|
docker push ${{ env.REGISTRY }}/${{ env.REPOSITORY }}:11.0.1-${{ matrix.arch }}
|
|
|
|
manifest:
|
|
name: update docker manifest
|
|
needs: build-image
|
|
runs-on: ubuntu-latest
|
|
container:
|
|
image: catthehacker/ubuntu:act-latest
|
|
|
|
steps:
|
|
- name: Login to registry
|
|
uses: docker/login-action@v3
|
|
with:
|
|
registry: ${{ env.REGISTRY }}
|
|
username: ${{ secrets.REGISTRY_USER }}
|
|
password: ${{ secrets.REGISTRY_TOKEN }}
|
|
|
|
- name: latest
|
|
run: |
|
|
docker manifest create \
|
|
${{ env.REGISTRY }}/${{ env.REPOSITORY }}:latest \
|
|
--amend ${{ env.REGISTRY }}/${{ env.REPOSITORY }}:latest-amd64 \
|
|
--amend ${{ env.REGISTRY }}/${{ env.REPOSITORY }}:latest-arm64
|
|
docker manifest push ${{ env.REGISTRY }}/${{ env.REPOSITORY }}:latest
|
|
|
|
- name: "11"
|
|
run: |
|
|
docker manifest create \
|
|
${{ env.REGISTRY }}/${{ env.REPOSITORY }}:11 \
|
|
--amend ${{ env.REGISTRY }}/${{ env.REPOSITORY }}:11-amd64 \
|
|
--amend ${{ env.REGISTRY }}/${{ env.REPOSITORY }}:11-arm64
|
|
docker manifest push ${{ env.REGISTRY }}/${{ env.REPOSITORY }}:11
|
|
|
|
- name: "11.0.1"
|
|
run: |
|
|
docker manifest create \
|
|
${{ env.REGISTRY }}/${{ env.REPOSITORY }}:11.0.1 \
|
|
--amend ${{ env.REGISTRY }}/${{ env.REPOSITORY }}:11.0.1-amd64 \
|
|
--amend ${{ env.REGISTRY }}/${{ env.REPOSITORY }}:11.0.1-arm64
|
|
docker manifest push ${{ env.REGISTRY }}/${{ env.REPOSITORY }}:11.0.1
|