Run on tag
Some checks failed
/ prepare-suffix (push) Successful in 1s
/ build-containers (map[name:amd64 platform:amd64]) (push) Has been skipped
/ build-containers (map[name:arm64v8 platform:arm64]) (push) Has been skipped
/ publish-docker (push) Has been skipped
/ build-assets (push) Failing after 24s
Some checks failed
/ prepare-suffix (push) Successful in 1s
/ build-containers (map[name:amd64 platform:amd64]) (push) Has been skipped
/ build-containers (map[name:arm64v8 platform:arm64]) (push) Has been skipped
/ publish-docker (push) Has been skipped
/ build-assets (push) Failing after 24s
This commit is contained in:
parent
333516d59c
commit
0057c3eb8b
|
@ -1,28 +1,16 @@
|
|||
on:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
git-branch:
|
||||
description: The branch to publish
|
||||
default: 'asonix/downstream'
|
||||
required: true
|
||||
git-repository:
|
||||
description: The repository to checkout
|
||||
default: 'asonix/mastodon'
|
||||
required: true
|
||||
git-host:
|
||||
description: Site hosting the repository
|
||||
default: 'https://git.asonix.dog'
|
||||
required: true
|
||||
registry-image:
|
||||
description: Docker image to publish
|
||||
default: 'asonix/mastodon'
|
||||
required: true
|
||||
|
||||
push:
|
||||
tags:
|
||||
- 'v*.*.*'
|
||||
|
||||
env:
|
||||
RAILS_SERVE_STATIC_FILES: 'true'
|
||||
RAILS_ENV: 'production'
|
||||
NODE_ENV: 'production'
|
||||
GIT_BRANCH: 'asonix/downstream'
|
||||
GIT_REPOSITORY: 'asonix/mastodon'
|
||||
GIT_HOST: 'https://git.asonix.dog'
|
||||
REGISTRY_IMAGE: 'asonix/mastodon'
|
||||
|
||||
|
||||
jobs:
|
||||
|
@ -33,8 +21,8 @@ jobs:
|
|||
name: Clone mastodon
|
||||
uses: https://github.com/actions/checkout@v4
|
||||
with:
|
||||
repository: ${{ inputs.git-repository }}
|
||||
ref: ${{ inputs.git-branch }}
|
||||
repository: ${{ env.GIT_REPOSITORY }}
|
||||
ref: ${{ env.GIT_BRANCH }}
|
||||
-
|
||||
name: Install Ruby
|
||||
uses: https://github.com/ruby/setup-ruby@v1
|
||||
|
@ -70,7 +58,7 @@ jobs:
|
|||
-
|
||||
name: Prepare suffix
|
||||
run: |
|
||||
suffix=${{ inputs.git-branch }}
|
||||
suffix=${{ env.GIT_BRANCH }}
|
||||
echo "suffix=${suffix//\//-}" >> "$GITHUB_OUTPUT"
|
||||
shell: bash
|
||||
|
||||
|
@ -107,7 +95,7 @@ jobs:
|
|||
id: meta
|
||||
uses: https://github.com/docker/metadata-action@v5
|
||||
with:
|
||||
images: ${{ inputs.registry-image }}
|
||||
images: ${{ env.REGISTRY_IMAGE }}
|
||||
flavor: |
|
||||
latest=auto
|
||||
suffix=-${{ needs.prepare-suffix.outputs.suffix }}-${{ matrix.info.name }}
|
||||
|
@ -135,12 +123,12 @@ jobs:
|
|||
with:
|
||||
context: .
|
||||
build-args: |
|
||||
GIT_REPOSITORY=${{ inputs.git-host }}/${{ inputs.git-repository }}
|
||||
GIT_BRANCH=${{ inputs.git-branch }}
|
||||
GIT_REPOSITORY=${{ env.GIT_HOST }}/${{ env.GIT_REPOSITORY }}
|
||||
GIT_BRANCH=${{ env.GIT_BRANCH }}
|
||||
platforms: ${{ matrix.info.platform }}
|
||||
tags: ${{ steps.meta.outputs.tags }}
|
||||
labels: ${{ steps.meta.outputs.labels }}
|
||||
outputs: type=image,name=${{ inputs.registry-image }},name-canonical=true,push=true
|
||||
outputs: type=image,name=${{ env.REGISTRY_IMAGE }},name-canonical=true,push=true
|
||||
-
|
||||
name: Export digest
|
||||
run: |
|
||||
|
@ -184,7 +172,7 @@ jobs:
|
|||
id: meta
|
||||
uses: https://github.com/docker/metadata-action@v5
|
||||
with:
|
||||
images: ${{ inputs.registry-image }}
|
||||
images: ${{ env.REGISTRY_IMAGE }}
|
||||
flavor: |
|
||||
latest=auto
|
||||
suffix=-${{ needs.prepare-suffix.outputs.suffix }}
|
||||
|
@ -198,11 +186,11 @@ jobs:
|
|||
working-directory: /tmp/digests
|
||||
run: |
|
||||
tags=$(jq -cr '.tags | map("-t " + .) | join(" ")' <<< "${DOCKER_METADATA_OUTPUT_JSON}")
|
||||
images=$(printf "${{ inputs.registry-image }}@sha256:%s " *)
|
||||
images=$(printf "${{ env.REGISTRY_IMAGE }}@sha256:%s " *)
|
||||
echo "Running 'docker buildx imagetools create ${tags[@]} ${images[@]}'"
|
||||
docker buildx imagetools create ${tags[@]} ${images[@]}
|
||||
shell: bash
|
||||
-
|
||||
name: Inspect Image
|
||||
run: |
|
||||
docker buildx imagetools inspect ${{ inputs.registry-image }}:${{ steps.meta.outputs.version }}
|
||||
docker buildx imagetools inspect ${{ env.REGISTRY_IMAGE }}:${{ steps.meta.outputs.version }}
|
||||
|
|
Loading…
Reference in a new issue