mirror of
https://github.com/gotenberg/gotenberg.git
synced 2026-08-08 00:22:14 +01:00
88 lines
2.5 KiB
YAML
88 lines
2.5 KiB
YAML
name: Build Test Push
|
|
description: Build, test and push Docker images for a given platform
|
|
author: Julien Neuhart
|
|
|
|
inputs:
|
|
github_token:
|
|
description: The GitHub token
|
|
required: true
|
|
default: ${{ github.token }}
|
|
docker_hub_username:
|
|
description: The Docker Hub username
|
|
required: true
|
|
docker_hub_password:
|
|
description: The Docker Hub password
|
|
required: true
|
|
platform:
|
|
description: linux/amd64, linux/386, linux/arm64, linux/arm/v7
|
|
required: true
|
|
version:
|
|
description: Gotenberg version
|
|
required: true
|
|
skip_integrations_tests:
|
|
description: Define whether to skip integration testing
|
|
default: false
|
|
alternate_repository:
|
|
description: Alternate repository to push the tags to
|
|
dry_run:
|
|
description: Dry run this action
|
|
|
|
outputs:
|
|
tags:
|
|
description: Comma separated list of tag
|
|
value: ${{ steps.build.outputs.tags }}
|
|
tags_cloud_run:
|
|
description: Comma separated list of Cloud Run tags (linux/amd64 only)
|
|
value: ${{ steps.build.outputs.tags_cloud_run }}
|
|
|
|
runs:
|
|
using: composite
|
|
steps:
|
|
- name: Set up QEMU
|
|
uses: docker/setup-qemu-action@v3
|
|
|
|
- name: Set up Docker Buildx
|
|
uses: docker/setup-buildx-action@v3
|
|
|
|
- name: Check out code
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Log in to Docker Hub
|
|
uses: docker/login-action@v3
|
|
with:
|
|
username: ${{ inputs.docker_hub_username }}
|
|
password: ${{ inputs.docker_hub_password }}
|
|
|
|
- name: Build ${{ inputs.platform }}
|
|
id: build
|
|
shell: bash
|
|
run: |
|
|
.github/actions/build-test-push/build.sh \
|
|
--version "${{ inputs.version }}" \
|
|
--platform "${{ inputs.platform }}" \
|
|
--alternate-repository "${{ inputs.alternate_repository }}" \
|
|
--dry-run "${{ inputs.dry_run }}"
|
|
|
|
- name: Run integration tests
|
|
if: ${{ inputs.skip_integrations_tests != 'true' }}
|
|
shell: bash
|
|
run: |
|
|
.github/actions/build-test-push/test.sh \
|
|
--version "${{ inputs.version }}" \
|
|
--platform "${{ inputs.platform }}" \
|
|
--alternate-repository "${{ inputs.alternate_repository }}" \
|
|
--dry-run "${{ inputs.dry_run }}"
|
|
|
|
- name: Push
|
|
shell: bash
|
|
run: |
|
|
.github/actions/build-test-push/push.sh \
|
|
--tags "${{ steps.build.outputs.tags }}" \
|
|
--dry-run "${{ inputs.dry_run }}"
|
|
|
|
- name: Outputs
|
|
shell: bash
|
|
run: |
|
|
echo "tags=${{ steps.build.outputs.tags }}"
|
|
echo "tags_cloud_run=${{ steps.build.outputs.tags_cloud_run }}"
|