Skip to content

Commit

Permalink
modify github action use tag release
Browse files Browse the repository at this point in the history
  • Loading branch information
HanWang233 committed Jul 27, 2022
1 parent a666c09 commit c298cf5
Showing 1 changed file with 15 additions and 3 deletions.
18 changes: 15 additions & 3 deletions .github/workflows/geth-publish.yaml
Expand Up @@ -3,7 +3,11 @@ name: GethPublisher
on:
workflow_dispatch:
push:
branches: [ dev-hanwang ]
# branches: [ main, feature/* ]
# Publish semver tags as releases.
tags: [ 'v*.*.*' ]
# pull_request:
# branches: [ main ]

env:
# Use docker.io for Docker Hub if empty
Expand All @@ -14,7 +18,12 @@ env:
jobs:

build:

runs-on: ubuntu-latest
permissions:
contents: read
packages: write

steps:
- uses: actions/checkout@v2

Expand All @@ -37,13 +46,16 @@ jobs:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
tags: |
type=sha
type=ref,event=branch
type=ref,event=pr
type=semver,pattern=v{{version}}
# Build and push Docker image with Buildx (don't push on PR)
# https://github.com/docker/build-push-action
- name: Build and push Docker image
uses: docker/build-push-action@v2
uses: docker/build-push-action@ad44023a93711e3deb337508980b4b5e9bcdc5dc
with:
context: .
push: true
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}

0 comments on commit c298cf5

Please sign in to comment.