Skip to content

Commit 861d7b7

Browse files
committed
chore: integrate upstream changes
1 parent 9fba76f commit 861d7b7

22 files changed

Lines changed: 1035 additions & 571 deletions

File tree

.env

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
GOTENBERG_VERSION=snapshot
2-
DOCKER_REGISTRY=gotenberg
2+
DOCKER_REGISTRY=ghcr.io/fulll
33
DOCKER_REPOSITORY=gotenberg
44
DOCKERFILE=build/Dockerfile
55
DOCKERFILE_CLOUDRUN=build/Dockerfile.cloudrun

.github/actions/build-test-push/action.yml

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,12 @@ inputs:
77
description: The GitHub token
88
required: true
99
default: ${{ github.token }}
10-
docker_hub_username:
11-
description: The Docker Hub username
12-
required: true
13-
docker_hub_password:
14-
description: The Docker Hub password
15-
required: true
10+
# docker_hub_username:
11+
# description: The Docker Hub username
12+
# required: true
13+
# docker_hub_password:
14+
# description: The Docker Hub password
15+
# required: true
1616
platform:
1717
description: linux/amd64, linux/ppc64le, linux/386, linux/arm64, linux/arm/v7
1818
required: true
@@ -50,12 +50,12 @@ runs:
5050
- name: Check out code
5151
uses: actions/checkout@v5
5252

53-
- name: Log in to Docker Hub
54-
if: inputs.docker_hub_username != ''
55-
uses: docker/login-action@v3
56-
with:
57-
username: ${{ inputs.docker_hub_username }}
58-
password: ${{ inputs.docker_hub_password }}
53+
# - name: Log in to Docker Hub
54+
# if: inputs.docker_hub_username != ''
55+
# uses: docker/login-action@v3
56+
# with:
57+
# username: ${{ inputs.docker_hub_username }}
58+
# password: ${{ inputs.docker_hub_password }}
5959

6060
- name: Build ${{ inputs.platform }}
6161
id: build
@@ -77,13 +77,13 @@ runs:
7777
--alternate-repository "${{ inputs.alternate_repository }}" \
7878
--dry-run "${{ inputs.dry_run }}"
7979
80-
- name: Push
81-
if: inputs.docker_hub_username != ''
82-
shell: bash
83-
run: |
84-
.github/actions/build-test-push/push.sh \
85-
--tags "${{ steps.build.outputs.tags }},${{ steps.build.outputs.tags_cloud_run }},${{ steps.build.outputs.tags_aws_lambda }}" \
86-
--dry-run "${{ inputs.dry_run }}"
80+
# - name: Push
81+
# if: inputs.docker_hub_username != ''
82+
# shell: bash
83+
# run: |
84+
# .github/actions/build-test-push/push.sh \
85+
# --tags "${{ steps.build.outputs.tags }},${{ steps.build.outputs.tags_cloud_run }},${{ steps.build.outputs.tags_aws_lambda }}" \
86+
# --dry-run "${{ inputs.dry_run }}"
8787

8888
- name: Outputs
8989
shell: bash

.github/workflows/continuous-delivery.yml

Lines changed: 29 additions & 121 deletions
Original file line numberDiff line numberDiff line change
@@ -19,132 +19,40 @@ jobs:
1919
- name: Checkout source code
2020
uses: actions/checkout@v6
2121

22+
# action modified to onlu build
2223
- name: Build and push
2324
id: build_push
2425
uses: ./.github/actions/build-test-push
2526
with:
26-
docker_hub_username: ${{ secrets.DOCKERHUB_USERNAME }}
27-
docker_hub_password: ${{ secrets.DOCKERHUB_TOKEN }}
2827
version: ${{ github.event.release.tag_name }}
2928
platform: linux/amd64
3029
skip_integrations_tests: true
3130

32-
release_386:
33-
name: Release linux/386
34-
runs-on: ubuntu-latest
35-
outputs:
36-
tags: ${{ steps.build_push.outputs.tags }}
37-
tags_cloud_run: ${{ steps.build_push.outputs.tags_cloud_run }}
38-
tags_aws_lambda: ${{ steps.build_push.outputs.tags_aws_lambda }}
39-
steps:
40-
- name: Checkout source code
41-
uses: actions/checkout@v6
42-
43-
- name: Build and push
44-
id: build_push
45-
uses: ./.github/actions/build-test-push
46-
with:
47-
docker_hub_username: ${{ secrets.DOCKERHUB_USERNAME }}
48-
docker_hub_password: ${{ secrets.DOCKERHUB_TOKEN }}
49-
version: ${{ github.event.release.tag_name }}
50-
platform: linux/386
51-
skip_integrations_tests: true
52-
53-
release_ppc64le:
54-
name: Release linux/ppc64le
55-
runs-on: ubuntu-24.04-ppc64le
56-
outputs:
57-
tags: ${{ steps.build_push.outputs.tags }}
58-
tags_cloud_run: ${{ steps.build_push.outputs.tags_cloud_run }}
59-
tags_aws_lambda: ${{ steps.build_push.outputs.tags_aws_lambda }}
60-
steps:
61-
- name: Checkout source code
62-
uses: actions/checkout@v6
63-
64-
- name: Build and push
65-
id: build_push
66-
uses: ./.github/actions/build-test-push
67-
with:
68-
docker_hub_username: ${{ secrets.DOCKERHUB_USERNAME }}
69-
docker_hub_password: ${{ secrets.DOCKERHUB_TOKEN }}
70-
version: ${{ github.event.release.tag_name }}
71-
platform: linux/ppc64le
72-
skip_integrations_tests: true
73-
74-
release_arm64:
75-
name: Release linux/arm64
76-
runs-on: ubuntu-24.04-arm
77-
outputs:
78-
tags: ${{ steps.build_push.outputs.tags }}
79-
tags_cloud_run: ${{ steps.build_push.outputs.tags_cloud_run }}
80-
tags_aws_lambda: ${{ steps.build_push.outputs.tags_aws_lambda }}
81-
steps:
82-
- name: Checkout source code
83-
uses: actions/checkout@v6
84-
85-
- name: Build and push
86-
id: build_push
87-
uses: ./.github/actions/build-test-push
88-
with:
89-
docker_hub_username: ${{ secrets.DOCKERHUB_USERNAME }}
90-
docker_hub_password: ${{ secrets.DOCKERHUB_TOKEN }}
91-
version: ${{ github.event.release.tag_name }}
92-
platform: linux/arm64
93-
skip_integrations_tests: true
94-
95-
release_arm_v7:
96-
name: Release linux/arm/v7
97-
runs-on: ubuntu-24.04-arm
98-
outputs:
99-
tags: ${{ steps.build_push.outputs.tags }}
100-
tags_cloud_run: ${{ steps.build_push.outputs.tags_cloud_run }}
101-
tags_aws_lambda: ${{ steps.build_push.outputs.tags_aws_lambda }}
102-
steps:
103-
- name: Checkout source code
104-
uses: actions/checkout@v6
105-
106-
- name: Build and push
107-
id: build_push
108-
uses: ./.github/actions/build-test-push
109-
with:
110-
docker_hub_username: ${{ secrets.DOCKERHUB_USERNAME }}
111-
docker_hub_password: ${{ secrets.DOCKERHUB_TOKEN }}
112-
version: ${{ github.event.release.tag_name }}
113-
platform: linux/arm/v7
114-
skip_integrations_tests: true
115-
116-
merge_clean_release_tags:
117-
needs:
118-
- release_amd64
119-
- release_386
120-
- release_ppc64le
121-
- release_arm64
122-
- release_arm_v7
123-
name: Merge and clean release tags
124-
runs-on: ubuntu-latest
125-
steps:
126-
- name: Checkout source code
127-
uses: actions/checkout@v6
128-
129-
- name: Merge
130-
uses: ./.github/actions/merge
131-
with:
132-
docker_hub_username: ${{ secrets.DOCKERHUB_USERNAME }}
133-
docker_hub_password: ${{ secrets.DOCKERHUB_TOKEN }}
134-
tags: "${{ needs.release_amd64.outputs.tags }},${{ needs.release_386.outputs.tags }},${{ needs.release_ppc64le.outputs.tags }},${{ needs.release_arm64.outputs.tags }},${{ needs.release_arm_v7.outputs.tags }}"
135-
alternate_registry: thecodingmachine
136-
137-
- name: Merge AWS Lambda
138-
uses: ./.github/actions/merge
139-
with:
140-
docker_hub_username: ${{ secrets.DOCKERHUB_USERNAME }}
141-
docker_hub_password: ${{ secrets.DOCKERHUB_TOKEN }}
142-
tags: "${{ needs.release_amd64.outputs.tags_aws_lambda }},${{ needs.release_arm64.outputs.tags_aws_lambda }}"
143-
alternate_registry: thecodingmachine
144-
145-
- name: Clean
146-
uses: ./.github/actions/clean
147-
with:
148-
docker_hub_username: ${{ secrets.DOCKERHUB_USERNAME }}
149-
docker_hub_password: ${{ secrets.DOCKERHUB_TOKEN }}
150-
tags: "${{ needs.release_amd64.outputs.tags }},${{ needs.release_386.outputs.tags }},${{ needs.release_ppc64le.outputs.tags }},${{ needs.release_arm64.outputs.tags }},${{ needs.release_arm_v7.outputs.tags }},${{ needs.release_amd64.outputs.tags_aws_lambda }},${{ needs.release_arm64.outputs.tags_aws_lambda }}"
31+
# list docker images that have bee built
32+
- name: Output built tags to console
33+
run: |
34+
echo "Tags: ${{ steps.build_push.outputs.tags }}"
35+
echo "Cloud Run Tags: ${{ steps.build_push.outputs.tags_cloud_run }}"
36+
echo "AWS Lambda Tags: ${{ steps.build_push.outputs.tags_aws_lambda }}"
37+
38+
- name: generate aws credentials config
39+
env:
40+
AWS_CREDENTIALS: ${{ secrets.STAGING_AWS_CREDENTIALS }}
41+
aws-region: eu-central-1
42+
run: |
43+
mkdir -p "${HOME}/.aws"
44+
echo "${AWS_CREDENTIALS}" > "${HOME}/.aws/credentials"
45+
46+
# Get the image build by the upstream process then :
47+
# - tag it for AWS ECR
48+
# - push it to AWS ECR
49+
- name: docker login and push
50+
run: |
51+
# Extract the tag name and strip the first letter using cut
52+
TAG_NAME=$(echo "${{ github.event.release.tag_name }}" | cut -c 2-)
53+
54+
docker tag ghcr.io/fulll/gotenberg:latest-cloudrun 285715278780.dkr.ecr.eu-central-1.amazonaws.com/gotenberg-fulll:${TAG_NAME}-cloudrun
55+
aws --region eu-central-1 ecr get-login-password | docker login --username AWS --password-stdin 285715278780.dkr.ecr.eu-central-1.amazonaws.com
56+
docker tag 285715278780.dkr.ecr.eu-central-1.amazonaws.com/gotenberg-fulll:${TAG_NAME}-cloudrun 285715278780.dkr.ecr.eu-central-1.amazonaws.com/gotenberg-fulll:latest
57+
docker push 285715278780.dkr.ecr.eu-central-1.amazonaws.com/gotenberg-fulll:${TAG_NAME}-cloudrun
58+
docker push 285715278780.dkr.ecr.eu-central-1.amazonaws.com/gotenberg-fulll:latest

0 commit comments

Comments
 (0)