mirror of
https://github.com/nodemailer/wildduck.git
synced 2024-12-27 02:10:52 +08:00
fix(docker): moved docker release workflow under release workflow
This commit is contained in:
parent
dd5a5ad2d5
commit
8db8d21285
1 changed files with 17 additions and 9 deletions
26
.github/workflows/release.yaml
vendored
26
.github/workflows/release.yaml
vendored
|
@ -10,8 +10,13 @@ permissions:
|
|||
|
||||
name: release
|
||||
jobs:
|
||||
release-please:
|
||||
release_please:
|
||||
runs-on: ubuntu-latest
|
||||
outputs:
|
||||
major: ${{ steps.release.outputs.major }}
|
||||
minor: ${{ steps.release.outputs.minor }}
|
||||
patch: ${{ steps.release.outputs.patch }}
|
||||
release_created: ${{ steps.release.outputs.release_created }}
|
||||
steps:
|
||||
- uses: google-github-actions/release-please-action@v3
|
||||
id: release
|
||||
|
@ -36,25 +41,30 @@ jobs:
|
|||
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
|
||||
if: ${{ steps.release.outputs.release_created }}
|
||||
|
||||
publish_docker:
|
||||
runs-on: ubuntu-latest
|
||||
needs: release_please
|
||||
if: ${{needs.release_please.outputs.release_created}}
|
||||
steps:
|
||||
- run: echo major ${{needs.release_please.outputs.major}}
|
||||
- run: echo minor ${{needs.release_please.outputs.minor}}
|
||||
- run: echo patch ${{needs.release_please.outputs.patch}}
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v3
|
||||
with:
|
||||
platforms: 'arm64,arm'
|
||||
if: ${{ steps.release.outputs.release_created }}
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
id: buildx
|
||||
uses: docker/setup-buildx-action@v3
|
||||
with:
|
||||
platforms: linux/arm64,linux/amd64,linux/arm/v7
|
||||
if: ${{ steps.release.outputs.release_created }}
|
||||
|
||||
- name: Login to DockerHub
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||
if: ${{ steps.release.outputs.release_created }}
|
||||
|
||||
- name: Login to GHCR
|
||||
uses: docker/login-action@v3
|
||||
|
@ -62,7 +72,6 @@ jobs:
|
|||
registry: ghcr.io
|
||||
username: ${{ github.repository_owner }}
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
if: ${{ steps.release.outputs.release_created }}
|
||||
|
||||
- name: Build and push
|
||||
uses: docker/build-push-action@v5
|
||||
|
@ -71,7 +80,6 @@ jobs:
|
|||
platforms: ${{ steps.buildx.outputs.platforms }}
|
||||
push: true
|
||||
tags: |
|
||||
type=semver,pattern={{steps.release.outputs.major}}.{{steps.release.outputs.minor}}.{{steps.release.outputs.patch}}
|
||||
type=semver,pattern={{steps.release.outputs.major}}.{{steps.release.outputs.minor}}
|
||||
type=semver,pattern={{steps.release.outputs.major}}
|
||||
if: ${{ steps.release.outputs.release_created }}
|
||||
${{ github.repository }}:{{steps.release.outputs.major}}.{{steps.release.outputs.minor}}.{{steps.release.outputs.patch}}
|
||||
${{ github.repository }}:{{steps.release.outputs.major}}.{{steps.release.outputs.minor}}
|
||||
${{ github.repository }}:{{steps.release.outputs.major}}
|
||||
|
|
Loading…
Reference in a new issue