Skip to content
This repository has been archived by the owner on May 11, 2024. It is now read-only.

Commit

Permalink
[build] more docker image tags when pushing to GCR (#7)
Browse files Browse the repository at this point in the history
  • Loading branch information
davidtaikocha committed Oct 12, 2022
1 parent a817512 commit 63b0580
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 13 deletions.
24 changes: 17 additions & 7 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,13 @@
name: "Push docker image to GCR"

on:
release:
types: [published]
pull_request:
push:
branches: [main]
types: [closed]
tags:
- "v*"

jobs:
push-docker-image:
if: ${{ github.event.pull_request.merged || startsWith(github.ref, 'refs/tags/v') }}
runs-on: ubuntu-latest

steps:
Expand All @@ -29,12 +27,24 @@ jobs:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1

- name: Docker meta
id: meta
uses: docker/metadata-action@v4
with:
images: |
gcr.io/evmchain/taiko-client
tags: |
type=ref,event=branch
type=ref,event=pr
type=ref,event=tag
type=sha
- name: Build and push
uses: docker/build-push-action@v2
with:
build-args: |
GITHUB_PERSONAL_TOKEN=${{ secrets.TK_REPO_ACCESS }}
platforms: linux/amd64
push: true
tags: |
gcr.io/evmchain/taiko-client:latest
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
4 changes: 0 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
GIT_COMMIT := $(shell git rev-parse HEAD)
GIT_DATE := $(shell git show -s --format='%ct')
VERSION := 0.0.0
VERSION_META := dev

LD_FLAGS_ARGS +=-X github.com/taikochain/taiko-client/version.Version=$(VERSION)
LD_FLAGS_ARGS +=-X github.com/taikochain/taiko-client/version.Meta=$(VERSION_META)
LD_FLAGS_ARGS +=-X github.com/taikochain/taiko-client/version.GitCommit=$(GIT_COMMIT)
LD_FLAGS_ARGS +=-X github.com/taikochain/taiko-client/version.GitDate=$(GIT_DATE)

Expand Down
4 changes: 2 additions & 2 deletions version/verison.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package version

// Version info, set via linker flags.
// Version info.
var (
Version = "0.0.0"
Version = "0.1.0"
Meta = "dev"
)

Expand Down

0 comments on commit 63b0580

Please sign in to comment.