mirror of
https://github.com/pushbits/server.git
synced 2025-04-29 18:26:49 +02:00
Move guard for tags to push filter in CI
This commit is contained in:
parent
c2425b239c
commit
fd4a08f75a
2 changed files with 10 additions and 5 deletions
9
.github/workflows/main.yml
vendored
9
.github/workflows/main.yml
vendored
|
@ -1,5 +1,12 @@
|
|||
name: Main
|
||||
on: [push, pull_request]
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- '**'
|
||||
tags:
|
||||
- '**'
|
||||
- '!v[0-9]+.[0-9]+.[0-9]+'
|
||||
pull_request:
|
||||
jobs:
|
||||
test_build:
|
||||
name: Test and build
|
||||
|
|
6
.github/workflows/publish.yml
vendored
6
.github/workflows/publish.yml
vendored
|
@ -1,8 +1,8 @@
|
|||
name: Publish
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
tags:
|
||||
- 'v[0-9]+.[0-9]+.[0-9]+'
|
||||
jobs:
|
||||
test_build_publish:
|
||||
name: Test, build, and publish
|
||||
|
@ -21,11 +21,9 @@ jobs:
|
|||
- name: Build image
|
||||
run: make build_image
|
||||
- name: Login to Docker Hub
|
||||
if: ${{ startsWith(github.ref, 'refs/tags/v') }} # Only login for tagged commits.
|
||||
uses: docker/login-action@v1
|
||||
with:
|
||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||
- name: Publish image
|
||||
if: ${{ startsWith(github.ref, 'refs/tags/v') }} # Only publish for tagged commits.
|
||||
run: make push_image
|
||||
|
|
Loading…
Add table
Reference in a new issue