Skip to content

Commit

Permalink
ci: fix release pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
aldor007 committed May 21, 2023
1 parent bf74932 commit dc8dcab
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 2 deletions.
43 changes: 43 additions & 0 deletions .github/workflows/docker-build-base.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Docker build

on:
push:
branches:
- 'master'
paths:
- Dockerfile.base

jobs:
multi:
runs-on: ubuntu-latest
steps:
-
name: Checkout
uses: actions/checkout@v2

- name: git tag
run: git fetch --tags; git fetch --prune --unshallow || true

-
name: Set up QEMU
uses: docker/setup-qemu-action@v1
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
-
name: Login to DockerHub
uses: docker/#-action@v1
with:
username: ${{ github.actor }}
password: ${{ secrets.GHR_TOKEN }}
registry: ghcr.io
-
name: Build and push
uses: docker/build-push-action@v2
with:
context: .
file: ./Dockerfile.base
platforms: linux/arm64,linux/amd64
push: true
tags: ghcr.io/aldor007/mort-base:latest

2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ ARG DATE "now"

ENV GOLANG_DOWNLOAD_URL https://golang.org/dl/go$GOLANG_VERSION.linux-$TARGETARCH.tar.gz

RUN curl -fsSL --insecure "$GOLANG_DOWNLOAD_URL" -o golang.tar.gz \
RUN rm -rvf /usr/local/go/ && curl -fsSL --insecure "$GOLANG_DOWNLOAD_URL" -o golang.tar.gz \
&& tar -C /usr/local -xzf golang.tar.gz \
&& rm golang.tar.gz

Expand Down
3 changes: 2 additions & 1 deletion pkg/cache/memory_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ func TestMemoryCache_Set(t *testing.T) {

i.Set(&obj, res)
resCache, err := i.Get(&obj)
b, _ := resCache.Body()
assert.Nil(t, err)
b, err := resCache.Body()
assert.Nil(t, err)

assert.Equal(t, resCache.StatusCode, res.StatusCode)
Expand Down

0 comments on commit dc8dcab

Please # to comment.