mirror of
https://github.com/freedomofpress/dangerzone.git
synced 2025-04-28 18:02:38 +02:00
WIP: Harmonize CI build with local one
This commit is contained in:
parent
75f240e0ae
commit
ce5ff0d560
2 changed files with 8 additions and 9 deletions
|
@ -36,13 +36,6 @@ jobs:
|
||||||
platform=${{ matrix.platform }}
|
platform=${{ matrix.platform }}
|
||||||
echo "PLATFORM_PAIR=${platform//\//-}" >> $GITHUB_ENV
|
echo "PLATFORM_PAIR=${platform//\//-}" >> $GITHUB_ENV
|
||||||
|
|
||||||
- name: Docker meta
|
|
||||||
id: meta
|
|
||||||
uses: docker/metadata-action@v5
|
|
||||||
with:
|
|
||||||
images: |
|
|
||||||
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
|
|
||||||
|
|
||||||
- name: Login to GHCR
|
- name: Login to GHCR
|
||||||
uses: docker/login-action@v3
|
uses: docker/login-action@v3
|
||||||
with:
|
with:
|
||||||
|
@ -68,7 +61,6 @@ jobs:
|
||||||
# reproduced.
|
# reproduced.
|
||||||
provenance: false
|
provenance: false
|
||||||
platforms: ${{ matrix.platform }}
|
platforms: ${{ matrix.platform }}
|
||||||
labels: ${{ steps.meta.outputs.labels }}
|
|
||||||
outputs: type=image,"name=${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}",push-by-digest=true,name-canonical=true,push=true
|
outputs: type=image,"name=${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}",push-by-digest=true,name-canonical=true,push=true
|
||||||
|
|
||||||
- name: Export digest
|
- name: Export digest
|
||||||
|
|
|
@ -115,12 +115,19 @@ def main():
|
||||||
|
|
||||||
# Build the container image, and tag it with the calculated tag
|
# Build the container image, and tag it with the calculated tag
|
||||||
print("Building container image")
|
print("Building container image")
|
||||||
buildx_args = ["buildx", "build"] if args.buildx else ["build"]
|
|
||||||
cache_args = [] if args.use_cache else ["--no-cache"]
|
cache_args = [] if args.use_cache else ["--no-cache"]
|
||||||
platform_args = [] if not args.platform else ["--platform", args.platform]
|
platform_args = [] if not args.platform else ["--platform", args.platform]
|
||||||
build_args = []
|
build_args = []
|
||||||
if args.debian_archive_date:
|
if args.debian_archive_date:
|
||||||
build_args = ["--build-arg", f"DEBIAN_ARCHIVE_DATE={args.debian_archive_date}"]
|
build_args = ["--build-arg", f"DEBIAN_ARCHIVE_DATE={args.debian_archive_date}"]
|
||||||
|
buildx_args = []
|
||||||
|
if args.buildx:
|
||||||
|
buildx_args = [
|
||||||
|
"buildx",
|
||||||
|
"build",
|
||||||
|
"--output",
|
||||||
|
"type=image,name-canonical=true,push=false,push-by-digest=false",
|
||||||
|
]
|
||||||
|
|
||||||
subprocess.run(
|
subprocess.run(
|
||||||
[
|
[
|
||||||
|
|
Loading…
Reference in a new issue