Skip to content

v8.27.2-SNAPSHOT

v8.27.2-SNAPSHOT #5

name: Continuous Delivery
on:
release:
types: [published]
permissions:
contents: read
jobs:
release_amd64:
name: Release linux/amd64
runs-on: ubuntu-latest
outputs:
tags: ${{ steps.build_push.outputs.tags }}
tags_cloud_run: ${{ steps.build_push.outputs.tags_cloud_run }}
tags_aws_lambda: ${{ steps.build_push.outputs.tags_aws_lambda }}
steps:
- name: Checkout source code
uses: actions/checkout@v6
# action modified to onlu build
- name: Build and push
id: build_push
uses: ./.github/actions/build-test-push
with:
version: ${{ github.event.release.tag_name }}
platform: linux/amd64
skip_integrations_tests: true
# list docker images that have bee built
- name: Output built tags to console
run: |
echo "Tags: ${{ steps.build_push.outputs.tags }}"
echo "Cloud Run Tags: ${{ steps.build_push.outputs.tags_cloud_run }}"
echo "AWS Lambda Tags: ${{ steps.build_push.outputs.tags_aws_lambda }}"
- name: generate aws credentials config
env:
AWS_CREDENTIALS: ${{ secrets.STAGING_AWS_CREDENTIALS }}
aws-region: eu-central-1
run: |
mkdir -p "${HOME}/.aws"
echo "${AWS_CREDENTIALS}" > "${HOME}/.aws/credentials"
# Get the image build by the upstream process then :
# - tag it for AWS ECR
# - push it to AWS ECR
- name: docker login and push
run: |
# Extract the tag name and strip the first letter using cut
TAG_NAME=$(echo "${{ github.event.release.tag_name }}" | cut -c 2-)
docker tag ghcr.io/fulll/gotenberg:latest-cloudrun ${AWS_ECR_REGISTRY}/gotenberg-fulll:${TAG_NAME}-cloudrun
aws --region eu-central-1 ecr get-login-password | docker login --username AWS --password-stdin ${AWS_ECR_REGISTRY}
docker tag ${AWS_ECR_REGISTRY}/gotenberg-fulll:${TAG_NAME}-cloudrun ${AWS_ECR_REGISTRY}/gotenberg-fulll:latest
docker push ${AWS_ECR_REGISTRY}/gotenberg-fulll:${TAG_NAME}-cloudrun
docker push ${AWS_ECR_REGISTRY}/gotenberg-fulll:latest
env:
AWS_ECR_REGISTRY: ${{ secrets.AWS_ECR_REGISTRY }}