Skip to content

Commit

Permalink
Push image on every new commit on main branch (#14)
Browse files Browse the repository at this point in the history
  • Loading branch information
anhductn2001 authored Mar 18, 2024
1 parent 2cc8431 commit 3c57f97
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
12 changes: 9 additions & 3 deletions .github/workflows/build_and_push_images.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# This workflow pushes new dymension images on every new commit on main.
# This workflow pushes new rollapp-wasm images on every new commit on main.
#
# ghcr.io/dymensionxyz/rollapp:latest
# ghcr.io/dymensionxyz/rollapp-wasm:latest
# ghcr.io/dymensionxyz/rollapp-wasm:{SHORT_SHA}

name: Push docker images
on:
Expand Down Expand Up @@ -28,6 +29,10 @@ jobs:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Create Docker Image Tag for vN.x branch
run: |
SHORT_SHA=$(echo ${GITHUB_SHA} | cut -c1-8)
echo "DOCKER_IMAGE_TAG=${SHORT_SHA}" >> $GITHUB_ENV
-
name: Build and push
id: build_push_image
Expand All @@ -38,4 +43,5 @@ jobs:
push: true
platforms: linux/amd64
tags: |
ghcr.io/dymensionxyz/rollapp:latest
ghcr.io/dymensionxyz/rollapp-wasm:latest
ghcr.io/dymensionxyz/rollapp-wasm:${{ env.DOCKER_IMAGE_TAG }}
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM golang:1.19-alpine3.16 as go-builder
FROM golang:1.21-alpine3.18 as go-builder

WORKDIR /app

Expand All @@ -14,7 +14,7 @@ RUN apk add --no-cache $PACKAGES

RUN make build

FROM alpine:3.16.1
FROM alpine:3.18

RUN apk add curl jq bash vim

Expand Down

0 comments on commit 3c57f97

Please sign in to comment.