mirror of
https://github.com/verdaccio/verdaccio.git
synced 2024-12-30 22:34:10 -05:00
build: publish Docker image to GitHub registry (5.x) (#1744)
* chore: test * chore: test * chore: test * chore: test * chore: test * chore: test * chore: test * chore: restore previous check file
This commit is contained in:
parent
644d42564d
commit
889e267106
1 changed files with 14 additions and 47 deletions
59
.github/workflows/docker-publish.yml
vendored
59
.github/workflows/docker-publish.yml
vendored
|
@ -1,52 +1,19 @@
|
||||||
name: Docker publish to docker.io
|
name: Publish docker image
|
||||||
|
|
||||||
on:
|
on: [push]
|
||||||
push:
|
|
||||||
paths:
|
|
||||||
- .github/workflows/docker-publish.yml
|
|
||||||
- 'src/**'
|
|
||||||
- 'conf/**'
|
|
||||||
- 'types/**'
|
|
||||||
- 'docker-bin/**'
|
|
||||||
- 'bin/**'
|
|
||||||
- 'package.json'
|
|
||||||
- 'yarn.lock'
|
|
||||||
branches:
|
|
||||||
- '**'
|
|
||||||
tags:
|
|
||||||
- 'v*'
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
docker:
|
testDocker:
|
||||||
|
name: Test Docker Build
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v1
|
||||||
- uses: docker/setup-qemu-action@v1
|
- name: Publish to registry
|
||||||
- uses: docker/setup-buildx-action@v1
|
uses: elgohr/Publish-Docker-Github-Action@master
|
||||||
with:
|
with:
|
||||||
driver-opts: network=host
|
name: docker.pkg.github.com/verdaccio/verdaccio/verdaccio
|
||||||
- uses: docker/login-action@v1
|
username: ${{secrets.DOCKER_USERNAME}}
|
||||||
name: Login Docker Hub
|
password: ${{secrets.GITHUB_REGISTRY_TOKEN}}
|
||||||
with:
|
registry: docker.pkg.github.com
|
||||||
username: ${{ secrets.DOCKER_USERNAME }}
|
tags: "5.x"
|
||||||
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: 5.x-next
|
|
||||||
tag-custom-only: ${{ github.ref == 'refs/heads/master' }}
|
|
||||||
tag-semver: |
|
|
||||||
{{version}}
|
|
||||||
{{major}}
|
|
||||||
{{major}}.{{minor}}
|
|
||||||
- name: Build & Push
|
|
||||||
uses: docker/build-push-action@v2
|
|
||||||
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 }}
|
|
||||||
|
|
Loading…
Reference in a new issue