mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-27 07:06:42 +00:00
feat: Configure l2geth Docker pipeline to push latest tag (#831)
* push latest tag * push latest tag on release published * use metadata-action to define tags * test * push ref name on push tag or push latest tag on publishing release
This commit is contained in:
parent
4e8468fdb7
commit
e30e1f16fd
1 changed files with 14 additions and 1 deletions
15
.github/workflows/docker.yaml
vendored
15
.github/workflows/docker.yaml
vendored
|
|
@ -4,6 +4,8 @@ on:
|
|||
push:
|
||||
tags:
|
||||
- '*'
|
||||
release:
|
||||
types: [published]
|
||||
|
||||
jobs:
|
||||
build-and-push:
|
||||
|
|
@ -15,6 +17,16 @@ jobs:
|
|||
uses: docker/setup-qemu-action@v2
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v2
|
||||
- name: Extract docker metadata
|
||||
id: meta
|
||||
uses: docker/metadata-action@v3
|
||||
with:
|
||||
images: scrolltech/l2geth
|
||||
tags: |
|
||||
type=ref,event=tag,enable=${{ github.event_name == 'push' }}
|
||||
type=raw,value=latest,enable=${{ github.event_name == 'release' }}
|
||||
flavor: |
|
||||
latest=false
|
||||
- name: Login to Docker Hub
|
||||
uses: docker/login-action@v2
|
||||
with:
|
||||
|
|
@ -27,6 +39,7 @@ jobs:
|
|||
file: Dockerfile
|
||||
# push: ${{ startsWith(github.ref, 'refs/tags/') }}
|
||||
push: true
|
||||
tags: scrolltech/l2geth:${{github.ref_name}}
|
||||
tags: ${{ steps.meta.outputs.tags }}
|
||||
labels: ${{ steps.meta.outputs.labels }}
|
||||
# cache-from: type=gha,scope=${{ github.workflow }}
|
||||
# cache-to: type=gha,scope=${{ github.workflow }}
|
||||
|
|
|
|||
Loading…
Reference in a new issue