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
|
name: Publish
|
||||||
on:
|
on:
|
||||||
|
page_build:
|
||||||
|
pull_request:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
push:
|
push:
|
||||||
branches: main
|
branches:
|
||||||
|
- "**"
|
||||||
tags:
|
tags:
|
||||||
- "*.*.*"
|
- "*.*.*"
|
||||||
jobs:
|
jobs:
|
||||||
|
@ -12,7 +17,7 @@ jobs:
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
- name: Prepare
|
- name: Prepare
|
||||||
id: prep
|
id: prep
|
||||||
uses: crazy-max/ghaction-docker-meta@v2
|
uses: docker/metadata-action@v3
|
||||||
with:
|
with:
|
||||||
images: |
|
images: |
|
||||||
${{ github.repository_owner }}/ftp-server
|
${{ github.repository_owner }}/ftp-server
|
||||||
|
@ -27,11 +32,13 @@ jobs:
|
||||||
- name: Set up Docker Buildx
|
- name: Set up Docker Buildx
|
||||||
uses: docker/setup-buildx-action@v1
|
uses: docker/setup-buildx-action@v1
|
||||||
- name: Login to DockerHub
|
- name: Login to DockerHub
|
||||||
|
if: github.event_name != 'pull_request'
|
||||||
uses: docker/login-action@v1
|
uses: docker/login-action@v1
|
||||||
with:
|
with:
|
||||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||||
- name: Login to GHCR
|
- name: Login to GHCR
|
||||||
|
if: github.event_name != 'pull_request'
|
||||||
uses: docker/login-action@v1
|
uses: docker/login-action@v1
|
||||||
with:
|
with:
|
||||||
registry: ghcr.io
|
registry: ghcr.io
|
||||||
|
@ -42,7 +49,7 @@ jobs:
|
||||||
with:
|
with:
|
||||||
context: .
|
context: .
|
||||||
platforms: linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64,linux/ppc64le,linux/s390x
|
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 }}
|
tags: ${{ steps.prep.outputs.tags }}
|
||||||
labels: ${{ steps.prep.outputs.labels }}
|
labels: ${{ steps.prep.outputs.labels }}
|
||||||
- name: Update Description
|
- name: Update Description
|
||||||
|
|
Loading…
Reference in a new issue