0
Fork 0
mirror of https://github.com/verdaccio/verdaccio.git synced 2025-02-24 23:55:46 -05:00
verdaccio/.github/workflows/shared-docker-publish.yml
dependabot[bot] 16aba09ab2
chore(deps): bump docker/setup-qemu-action from 3.2.0 to 3.3.0 (#5082)
Bumps [docker/setup-qemu-action](https://github.com/docker/setup-qemu-action) from 3.2.0 to 3.3.0.
- [Release notes](https://github.com/docker/setup-qemu-action/releases)
- [Commits](49b3bc8e6b...53851d1459)

---
updated-dependencies:
- dependency-name: docker/setup-qemu-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-02-02 10:52:25 +01:00

56 lines
1.7 KiB
YAML

name: Docker publish to docker.io
on:
workflow_call:
inputs:
tag-latest:
required: true
type: boolean
description: 'Tag as latest'
default: false
tag-custom:
required: true
type: string
description: 'Custom tag'
default: 'nightly-master'
tag-custom-only:
required: true
type: boolean
description: 'Custom tag only'
default: false
jobs:
docker:
runs-on: ubuntu-latest
if: github.repository == 'verdaccio/verdaccio'
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- uses: docker/setup-qemu-action@53851d14592bedcffcf25ea515637cff71ef929a # v3.3.0
- uses: docker/setup-buildx-action@v1
with:
driver-opts: network=host
- uses: docker/login-action@v1
name: Login Docker Hub
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Prepare docker image tags
id: docker_meta
uses: crazy-max/ghaction-docker-meta@v1
with:
images: ${{ github.repository }}
tag-custom: ${{ inputs.tag-custom }}
tag-custom-only: ${{ inputs.tag-custom-only }}
tag-latest: ${{ inputs.tag-latest }}
tag-semver: |
{{version}}
{{major}}
{{major}}.{{minor}}
- name: Build & Push
uses: docker/build-push-action@v6
with:
context: .
file: ./Dockerfile
platforms: linux/amd64,linux/arm64
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.docker_meta.outputs.tags }}
labels: ${{ steps.docker_meta.outputs.labels }}