@@ -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