chore(ci): run ci on pull requests and page builds
This commit is contained in:
parent
3315a73ca5
commit
fc837e7c0a
1 changed files with 10 additions and 3 deletions
13
.github/workflows/publish.yml
vendored
13
.github/workflows/publish.yml
vendored
|
@ -1,7 +1,12 @@
|
|||
name: Publish
|
||||
on:
|
||||
page_build:
|
||||
pull_request:
|
||||
branches:
|
||||
- main
|
||||
push:
|
||||
branches: main
|
||||
branches:
|
||||
- "**"
|
||||
tags:
|
||||
- "*.*.*"
|
||||
jobs:
|
||||
|
@ -12,7 +17,7 @@ jobs:
|
|||
uses: actions/checkout@v2
|
||||
- name: Prepare
|
||||
id: prep
|
||||
uses: crazy-max/ghaction-docker-meta@v2
|
||||
uses: docker/metadata-action@v3
|
||||
with:
|
||||
images: |
|
||||
${{ github.repository_owner }}/ftp-server
|
||||
|
@ -27,11 +32,13 @@ jobs:
|
|||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v1
|
||||
- name: Login to DockerHub
|
||||
if: github.event_name != 'pull_request'
|
||||
uses: docker/login-action@v1
|
||||
with:
|
||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||
- name: Login to GHCR
|
||||
if: github.event_name != 'pull_request'
|
||||
uses: docker/login-action@v1
|
||||
with:
|
||||
registry: ghcr.io
|
||||
|
@ -42,7 +49,7 @@ jobs:
|
|||
with:
|
||||
context: .
|
||||
platforms: linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64,linux/ppc64le,linux/s390x
|
||||
push: true
|
||||
push: ${{ github.event_name != 'pull_request' }}
|
||||
tags: ${{ steps.prep.outputs.tags }}
|
||||
labels: ${{ steps.prep.outputs.labels }}
|
||||
- name: Update Description
|
||||
|
|
Loading…
Reference in a new issue