From 9afa097abd3ad6666f44550093e2a4446674b652 Mon Sep 17 00:00:00 2001 From: Valentin Kuznetsov Date: Sat, 10 Feb 2024 08:45:13 -0500 Subject: [PATCH] new image Github action file --- .github/workflows/image.yml | 42 +++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 .github/workflows/image.yml diff --git a/.github/workflows/image.yml b/.github/workflows/image.yml new file mode 100644 index 0000000..469b69e --- /dev/null +++ b/.github/workflows/image.yml @@ -0,0 +1,42 @@ +name: Docker image + +on: + push: + tags: + - "v*" # triggers only if push new tag version, like `0.8.4` or else + +jobs: + + build: + name: Build + runs-on: ubuntu-latest + steps: + + - name: Set up Go + uses: actions/setup-go@v2 + with: + go-version: ^1.21 + + - name: Check out code into the Go module directory + uses: actions/checkout@v2 + + - name: Build image + run: | + make golib + docker build --build-arg srv=DataBookkeeping --build-arg tag=${GITHUB_REF##*/} -t ghcr.io/chesscomputing/databookkeeping ../golib/k8s + +# - name: Login to docker github registry +# uses: docker/login-action@v1.6.0 +# with: +# registry: docker.pkg.github.com +# username: ${{ github.actor }} +# password: ${{ secrets.GITHUB_TOKEN }} + +# - name: Publish image +# uses: docker/build-push-action@v1 +# with: +# username: ${{ github.actor }} +# password: ${{ secrets.GITHUB_TOKEN }} +# registry: docker.pkg.github.com +# repository: vkuznet/dbs2go/dbs2go +# tag_with_ref: true