Skip to content

Commit

Permalink
fix(ci): update docker release
Browse files Browse the repository at this point in the history
robert-zaremba committed Dec 20, 2022

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
1 parent c8b024a commit 30f87ed
Showing 4 changed files with 33 additions and 14 deletions.
7 changes: 6 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
name: Build
on: [push, pull_request]
on:
pull_request:
push:
branches:
- main
- release/**

concurrency:
group: ci-${{ github.ref }}-${{ github.workflow }}
32 changes: 22 additions & 10 deletions .github/workflows/docker-release.yml
Original file line number Diff line number Diff line change
@@ -3,10 +3,8 @@
name: Peggo Docker Release
on:
push:
# Sequence of patterns matched against refs/tags
tags:
- "v[0-9]+\\.[0-9]+\\.[0-9]+" # Official release version tags e.g. v2.0.5
- "v[0-9]+\\.[0-9]+\\.[0-9]+-rc[0-9]+" # Release candidate tags e.g. v1.0.3-rc4
- "v[0-9]+.[0-9]+.[0-9]+" # Push events to matching v*, i.e. v1.0, v20.15.10

concurrency:
group: ci-${{ github.ref }}-${{ github.workflow }}
@@ -20,18 +18,28 @@ jobs:
- name: checkout
uses: actions/checkout@v3

- name: Set up QEMU
uses: docker/setup-qemu-action@v2

- name: Docker meta
- name: Extract Docker metadata
id: meta
uses: docker/metadata-action@v4
with:
images: umee-network/peggo
# github.repository == <account>/<repo>
images: ghcr.io/${{ github.repository_owner }}/peggo
tags: |
type=raw,value=latest,enable={{is_default_branch}}
type=semver,pattern={{version}}
type=semver,pattern=latest-{{major}}.{{minor}}
flavor: |
latest=false
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2

- name: Print tags and labels
run: |
echo image: ${{ env.REGISTRY }}/${{ github.repository }}
echo tags "${{ steps.meta.outputs.tags }}"
echo labels "${{ steps.meta.outputs.labels }}"
- name: Login to GHCR
uses: docker/login-action@v2
with:
@@ -42,7 +50,11 @@ jobs:
- name: Build and push
uses: docker/build-push-action@v3
with:
context: ./contrib/images/Dockerfile
push: true
file: contrib/images/Dockerfile
platforms: linux/amd64
# platforms: linux/amd64,linux/arm64 # requires qemu action
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -34,6 +34,6 @@ jobs:
if: startsWith(github.ref, 'refs/tags/')
with:
version: latest
args: release --rm-dist --release-notes ./RELEASE_NOTES.md
args: release --rm-dist # --release-notes ./RELEASE_NOTES.md
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
6 changes: 4 additions & 2 deletions contrib/images/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
## image for docker Peggo release

# Fetch base packages
FROM golang:1.19-bullseye AS builder
WORKDIR /src/peggo/
COPY . .
RUN make install
RUN make install && \
wget https://raw.githubusercontent.com/CosmWasm/wasmvm/v1.1.1/internal/api/libwasmvm.x86_64.so

# prepare final image
FROM ubuntu:rolling
COPY --from=builder /go/bin/peggo /usr/local/bin/
COPY --from=builder /src/peggo/libwasmvm.x86_64.so /lib/
CMD ["peggo"]
STOPSIGNAL SIGTERM

0 comments on commit 30f87ed

Please sign in to comment.