mirror of
https://github.com/invoiceninja/dockerfiles.git
synced 2025-12-31 19:47:25 +01:00
66
.github/workflows/build-image-debian.yaml
vendored
66
.github/workflows/build-image-debian.yaml
vendored
@@ -3,12 +3,12 @@ name: Build Debian Container Image
|
|||||||
on:
|
on:
|
||||||
pull_request:
|
pull_request:
|
||||||
paths:
|
paths:
|
||||||
|
- ".github/**"
|
||||||
- "debian/**"
|
- "debian/**"
|
||||||
push:
|
push:
|
||||||
paths:
|
paths:
|
||||||
|
- ".github/**"
|
||||||
- "debian/**"
|
- "debian/**"
|
||||||
branches:
|
|
||||||
- master
|
|
||||||
|
|
||||||
env:
|
env:
|
||||||
REGISTRY_IMAGE: invoiceninja/invoiceninja-debian
|
REGISTRY_IMAGE: invoiceninja/invoiceninja-debian
|
||||||
@@ -26,28 +26,17 @@ jobs:
|
|||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v5
|
uses: actions/checkout@v5
|
||||||
|
|
||||||
- name: Prepare
|
|
||||||
run: |
|
|
||||||
platform=${{ matrix.platform }}
|
|
||||||
echo "PLATFORM_PAIR=${platform//\//-}" >> $GITHUB_ENV
|
|
||||||
|
|
||||||
- name: Docker meta
|
- name: Docker meta
|
||||||
id: meta
|
id: meta
|
||||||
uses: docker/metadata-action@v5
|
uses: docker/metadata-action@v5
|
||||||
with:
|
with:
|
||||||
images: ${{ env.REGISTRY_IMAGE }}
|
images: ${{ env.REGISTRY_IMAGE }}
|
||||||
|
|
||||||
- name: Login to DockerHub
|
|
||||||
uses: docker/login-action@v3
|
|
||||||
with:
|
|
||||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
|
||||||
password: ${{ secrets.DOCKERHUB_PASSWORD }}
|
|
||||||
|
|
||||||
- name: Set up Docker Buildx
|
- name: Set up Docker Buildx
|
||||||
id: buildx
|
id: buildx
|
||||||
uses: docker/setup-buildx-action@v3
|
uses: docker/setup-buildx-action@v3
|
||||||
|
|
||||||
- name: Build and push by digest
|
- name: Build
|
||||||
id: build
|
id: build
|
||||||
uses: docker/build-push-action@v6
|
uses: docker/build-push-action@v6
|
||||||
with:
|
with:
|
||||||
@@ -55,53 +44,6 @@ jobs:
|
|||||||
platforms: ${{ matrix.platform }}
|
platforms: ${{ matrix.platform }}
|
||||||
labels: ${{ steps.meta.outputs.labels }}
|
labels: ${{ steps.meta.outputs.labels }}
|
||||||
tags: ${{ env.REGISTRY_IMAGE }}
|
tags: ${{ env.REGISTRY_IMAGE }}
|
||||||
outputs: type=image,push-by-digest=true,name-canonical=true,push=true
|
outputs: type=image,push-by-digest=true,name-canonical=true
|
||||||
cache-from: type=gha
|
cache-from: type=gha
|
||||||
cache-to: type=gha,mode=max
|
cache-to: type=gha,mode=max
|
||||||
|
|
||||||
- name: Export digest
|
|
||||||
run: |
|
|
||||||
mkdir -p ${{ runner.temp }}/digests
|
|
||||||
digest="${{ steps.build.outputs.digest }}"
|
|
||||||
touch "${{ runner.temp }}/digests/${digest#sha256:}"
|
|
||||||
|
|
||||||
- name: Upload digest
|
|
||||||
uses: actions/upload-artifact@v4
|
|
||||||
with:
|
|
||||||
name: digests-${{ env.PLATFORM_PAIR }}
|
|
||||||
path: ${{ runner.temp }}/digests/*
|
|
||||||
if-no-files-found: error
|
|
||||||
retention-days: 1
|
|
||||||
|
|
||||||
merge:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
needs:
|
|
||||||
- build
|
|
||||||
steps:
|
|
||||||
- name: Download digests
|
|
||||||
uses: actions/download-artifact@v4
|
|
||||||
with:
|
|
||||||
path: ${{ runner.temp }}/digests
|
|
||||||
pattern: digests-*
|
|
||||||
merge-multiple: true
|
|
||||||
|
|
||||||
- name: Login to Docker Hub
|
|
||||||
uses: docker/login-action@v3
|
|
||||||
with:
|
|
||||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
|
||||||
password: ${{ secrets.DOCKERHUB_PASSWORD }}
|
|
||||||
|
|
||||||
- name: Set up Docker Buildx
|
|
||||||
uses: docker/setup-buildx-action@v3
|
|
||||||
|
|
||||||
- name: Docker meta
|
|
||||||
id: meta
|
|
||||||
uses: docker/metadata-action@v5
|
|
||||||
with:
|
|
||||||
images: ${{ env.REGISTRY_IMAGE }}
|
|
||||||
|
|
||||||
- name: Create manifest list and push (--dry-run)
|
|
||||||
working-directory: ${{ runner.temp }}/digests
|
|
||||||
run: |
|
|
||||||
docker buildx imagetools create --dry-run $(jq -cr '.tags | map("-t " + .) | join(" ")' <<< "$DOCKER_METADATA_OUTPUT_JSON") \
|
|
||||||
$(printf '${{ env.REGISTRY_IMAGE }}@sha256:%s ' *)
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
[](https://hub.docker.com/r/invoiceninja/invoiceninja-debian)
|
[](https://hub.docker.com/r/invoiceninja/invoiceninja-debian)
|
||||||
[](https://hub.docker.com/r/invoiceninja/invoiceninja-debian)
|
[](https://hub.docker.com/r/invoiceninja/invoiceninja-debian)
|
||||||
[](https://github.com/invoiceninja/dockerfiles/actions/workflows/publish-image.yaml)
|
[](https://github.com/invoiceninja/dockerfiles/actions/workflows/publish-image-debian.yaml)
|
||||||
[](https://github.com/invoiceninja/dockerfiles/actions/workflows/build-image-v5.yaml)
|
[](https://github.com/invoiceninja/dockerfiles/actions/workflows/build-image-debian.yaml)
|
||||||
|
|
||||||
# Debian Docker for [Invoice Ninja](https://www.invoiceninja.com/)
|
# Debian Docker for [Invoice Ninja](https://www.invoiceninja.com/)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user