Skip to content

Commit db22721

Browse files
authored
fix: run Docker only when the new tag is pushed.
1 parent 278d57e commit db22721

File tree

2 files changed

+15
-17
lines changed

2 files changed

+15
-17
lines changed

.github/workflows/docker-publish.yml

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,15 @@ name: Docker
22

33
on:
44
push:
5-
branches: [ master ]
6-
tags: [ 'v*.*.*' ]
5+
tags:
6+
- "v*.*.*"
77

88
env:
99
REGISTRY: ghcr.io
1010
IMAGE_NAME: ${{ github.repository }}
1111

12-
1312
jobs:
1413
build:
15-
1614
runs-on: ubuntu-latest
1715
permissions:
1816
contents: read
@@ -39,7 +37,7 @@ jobs:
3937
uses: docker/metadata-action@98669ae865ea3cffbcbaa878cf57c20bbf1c6c38
4038
with:
4139
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
42-
40+
4341
- name: Set up Docker Buildx
4442
id: buildx
4543
uses: docker/setup-buildx-action@master

.github/workflows/go.yml

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3,21 +3,21 @@ name: Go
33
on:
44
push:
55
branches:
6-
- master
6+
- master
77
pull_request:
88

99
jobs:
1010
build-and-release:
1111
runs-on: ubuntu-latest
1212
steps:
13-
- uses: actions/checkout@v2
14-
- uses: actions/setup-go@v2
15-
with:
16-
go-version: 1.16
17-
- run: go build -v ./...
18-
- run: go test -v ./...
19-
- uses: go-semantic-release/action@v1
20-
if: ${{ github.ref == 'refs/heads/master' }}
21-
with:
22-
github-token: ${{ secrets.GITHUB_TOKEN }}
23-
allow-initial-development-versions: true
13+
- uses: actions/checkout@v2
14+
- uses: actions/setup-go@v2
15+
with:
16+
go-version: 1.16
17+
- run: go build -v ./...
18+
- run: go test -v ./...
19+
- uses: go-semantic-release/action@v1
20+
if: ${{ github.ref == 'refs/heads/master' }}
21+
with:
22+
github-token: ${{ secrets.GITHUB_TOKEN }}
23+
allow-initial-development-versions: true

0 commit comments

Comments
 (0)