ci(workflows): use sub-actions

This commit is contained in:
Julien Neuhart
2025-01-24 09:41:31 +01:00
parent 66ade27383
commit 09e511bc49
5 changed files with 55 additions and 57 deletions

View File

@@ -15,13 +15,13 @@ on:
default: ''
outputs:
tags:
value: ${{ jobs.gotenberg_build_push.outputs.tags }}
value: ${{ jobs.build_push.outputs.tags }}
permissions:
contents: read
jobs:
gotenberg_build_push:
build_push:
runs-on: ${{ inputs.runs_on }}
outputs:
tags: ${{ steps.build_push.outputs.tags }}
@@ -43,9 +43,8 @@ jobs:
- name: Build and push ${{ inputs.platform }}
id: build_push
uses: gotenberg/gotenberg-release-action@main
uses: gotenberg/gotenberg-release-action/actions/build-push@main
with:
step: build_push
version: ${{ inputs.gotenberg_version }}
platform: ${{ inputs.platform }}
alternate_repository: ${{ inputs.alternate_repository }}

View File

@@ -12,7 +12,7 @@ permissions:
contents: read
jobs:
gotenberg_merge_clean:
merge_clean:
runs-on: ubuntu-latest
steps:
- name: Set up QEMU
@@ -31,9 +31,8 @@ jobs:
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Merge and clean
uses: gotenberg/gotenberg-release-action@main
uses: gotenberg/gotenberg-release-action/actions/merge-clean@main
with:
step: merge_clean
docker_hub_username: ${{ secrets.DOCKERHUB_USERNAME }}
docker_hub_password: ${{ secrets.DOCKERHUB_TOKEN }}
tags: ${{ inputs.tags }}

View File

@@ -10,38 +10,38 @@ permissions:
jobs:
release_amd64:
name: Release linux/amd64
uses: ./.github/workflows/gotenberg-build-push.yml
uses: ./.github/workflows/__build-push.yml
secrets: inherit
with:
runs_on: 'ubuntu-latest'
platform: 'linux/amd64'
runs_on: ubuntu-latest
platform: linux/amd64
gotenberg_version: ${{ github.event.release.tag_name }}
release_386:
name: Release linux/386
uses: ./.github/workflows/gotenberg-build-push.yml
uses: ./.github/workflows/__build-push.yml
secrets: inherit
with:
runs_on: 'ubuntu-latest'
platform: 'linux/386'
runs_on: ubuntu-latest
platform: linux/386
gotenberg_version: ${{ github.event.release.tag_name }}
release_arm64:
name: Release linux/arm64
uses: ./.github/workflows/gotenberg-build-push.yml
uses: ./.github/workflows/__build-push.yml
secrets: inherit
with:
runs_on: 'ubuntu-24.04-arm'
platform: 'linux/arm64'
runs_on: ubuntu-24.04-arm
platform: linux/arm64
gotenberg_version: ${{ github.event.release.tag_name }}
release_arm_v7:
name: Release linux/arm/v7
uses: ./.github/workflows/gotenberg-build-push.yml
uses: ./.github/workflows/__build-push.yml
secrets: inherit
with:
runs_on: 'ubuntu-24.04-arm'
platform: 'linux/arm/v7'
runs_on: ubuntu-24.04-arm
platform: linux/arm/v7
gotenberg_version: ${{ github.event.release.tag_name }}
merge_clean_release_tags:
@@ -51,8 +51,8 @@ jobs:
- release_arm64
- release_arm_v7
name: Merge and clean release tags
uses: ./.github/workflows/gotenberg-merge-clean.yml
uses: ./.github/workflows/__merge-clean.yml
secrets: inherit
with:
tags: "${{ needs.release_amd64.outputs.tags }},${{ needs.release_386.outputs.tags }},${{ needs.release_arm64.outputs.tags }},${{ needs.release_arm_v7.outputs.tags }}"
alternate_registry: 'thecodingmachine'
alternate_registry: thecodingmachine

View File

@@ -67,52 +67,52 @@ jobs:
needs:
- tests
name: Snapshot linux/amd64
uses: ./.github/workflows/gotenberg-build-push.yml
uses: ./.github/workflows/__build-push.yml
secrets: inherit
with:
runs_on: 'ubuntu-latest'
platform: 'linux/amd64'
runs_on: ubuntu-latest
platform: linux/amd64
gotenberg_version: pr-${{ github.event.pull_request.number }}
alternate_repository: 'snapshot'
alternate_repository: snapshot
snapshot_386:
if: github.event_name == 'pull_request'
needs:
- tests
name: Snapshot linux/386
uses: ./.github/workflows/gotenberg-build-push.yml
uses: ./.github/workflows/__build-push.yml
secrets: inherit
with:
runs_on: 'ubuntu-latest'
platform: 'linux/386'
runs_on: ubuntu-latest
platform: linux/386
gotenberg_version: pr-${{ github.event.pull_request.number }}
alternate_repository: 'snapshot'
alternate_repository: snapshot
snapshot_arm64:
if: github.event_name == 'pull_request'
needs:
- tests
name: Snapshot linux/arm64
uses: ./.github/workflows/gotenberg-build-push.yml
uses: ./.github/workflows/__build-push.yml
secrets: inherit
with:
runs_on: 'ubuntu-24.04-arm'
platform: 'linux/arm64'
runs_on: ubuntu-24.04-arm
platform: linux/arm64
gotenberg_version: pr-${{ github.event.pull_request.number }}
alternate_repository: 'snapshot'
alternate_repository: snapshot
snapshot_arm_v7:
if: github.event_name == 'pull_request'
needs:
- tests
name: Snapshot linux/arm/v7
uses: ./.github/workflows/gotenberg-build-push.yml
uses: ./.github/workflows/__build-push.yml
secrets: inherit
with:
runs_on: 'ubuntu-24.04-arm'
platform: 'linux/arm/v7'
runs_on: ubuntu-24.04-arm
platform: linux/arm/v7
gotenberg_version: pr-${{ github.event.pull_request.number }}
alternate_repository: 'snapshot'
alternate_repository: snapshot
merge_clean_snapshot_tags:
needs:
@@ -121,7 +121,7 @@ jobs:
- snapshot_arm64
- snapshot_arm_v7
name: Merge and clean snapshot tags
uses: ./.github/workflows/gotenberg-merge-clean.yml
uses: ./.github/workflows/__merge-clean.yml
secrets: inherit
with:
tags: "${{ needs.snapshot_amd64.outputs.tags }},${{ needs.snapshot_386.outputs.tags }},${{ needs.snapshot_arm64.outputs.tags }},${{ needs.snapshot_arm_v7.outputs.tags }}"
@@ -131,48 +131,48 @@ jobs:
needs:
- tests
name: Edge linux/amd64
uses: ./.github/workflows/gotenberg-build-push.yml
uses: ./.github/workflows/__build-push.yml
secrets: inherit
with:
runs_on: 'ubuntu-latest'
platform: 'linux/amd64'
gotenberg_version: 'edge'
runs_on: ubuntu-latest
platform: linux/amd64
gotenberg_version: edge
edge_386:
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
needs:
- tests
name: Edge linux/386
uses: ./.github/workflows/gotenberg-build-push.yml
uses: ./.github/workflows/__build-push.yml
secrets: inherit
with:
runs_on: 'ubuntu-latest'
platform: 'linux/386'
gotenberg_version: 'edge'
runs_on: ubuntu-latest
platform: linux/386
gotenberg_version: edge
edge_arm64:
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
needs:
- tests
name: Edge linux/arm64
uses: ./.github/workflows/gotenberg-build-push.yml
uses: ./.github/workflows/__build-push.yml
secrets: inherit
with:
runs_on: 'ubuntu-24.04-arm'
platform: 'linux/arm64'
gotenberg_version: 'edge'
runs_on: ubuntu-24.04-arm
platform: linux/arm64
gotenberg_version: edge
edge_arm_v7:
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
needs:
- tests
name: Edge linux/arm/v7
uses: ./.github/workflows/gotenberg-build-push.yml
uses: ./.github/workflows/__build-push.yml
secrets: inherit
with:
runs_on: 'ubuntu-24.04-arm'
platform: 'linux/arm/v7'
gotenberg_version: 'edge'
runs_on: ubuntu-24.04-arm
platform: linux/arm/v7
gotenberg_version: edge
merge_clean_edge_tags:
needs:
@@ -181,8 +181,8 @@ jobs:
- edge_arm64
- edge_arm_v7
name: Merge and clean edge tags
uses: ./.github/workflows/gotenberg-merge-clean.yml
uses: ./.github/workflows/__merge-clean.yml
secrets: inherit
with:
tags: "${{ needs.edge_amd64.outputs.tags }},${{ needs.edge_386.outputs.tags }},${{ needs.edge_arm64.outputs.tags }},${{ needs.edge_arm_v7.outputs.tags }}"
alternate_registry: 'thecodingmachine'
alternate_registry: thecodingmachine