Skip to content

Commit

Permalink
Merge pull request #98 from crazy-max/fix-latest
Browse files Browse the repository at this point in the history
ci: fix latest version
  • Loading branch information
crazy-max authored Apr 9, 2023
2 parents de1c810 + f409383 commit d430f48
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -92,14 +92,15 @@ jobs:
result-encoding: string
script: |
const os = require('os');
const majorMinor = "${{ matrix.go_version }}".match(/[0-9]+\.[0-9]+/g)[0];
const tags = ["${{ matrix.go_version }}"];
switch ("${{ matrix.go_version }}") {
case "${{ env.LATEST_CURRENT }}": {
tags.push("1.19.x", "1.19", "latest");
tags.push(`${majorMinor}.x`, majorMinor, "latest");
break;
}
case "${{ env.LATEST_PREVIOUS }}": {
tags.push("1.18.x", "1.18");
tags.push(`${majorMinor}.x`, majorMinor);
break;
}
}
Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
name: test

concurrency:
group: test-${{ github.ref }}
cancel-in-progress: true

on:
push:
branches:
- 'master'
tags:
- '*'
paths-ignore:
- '**.md'
pull_request:
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ ARG ALPINE_VERSION="3.17"
ARG PLATFORMS="linux/386 linux/amd64 linux/arm64 linux/arm/v5 linux/arm/v6 linux/arm/v7 linux/mips linux/mipsle linux/mips64 linux/mips64le linux/ppc64le linux/riscv64 linux/s390x windows/386 windows/amd64"

FROM --platform=$BUILDPLATFORM tonistiigi/xx:${XX_VERSION} AS xx
FROM --platform=$BUILDPLATFORM golang:1.19-alpine${ALPINE_VERSION} AS base
FROM --platform=$BUILDPLATFORM golang:1.20-alpine${ALPINE_VERSION} AS base
COPY --from=xx / /
ENV CGO_ENABLED=0
RUN apk add --no-cache file git
Expand Down

0 comments on commit d430f48

Please sign in to comment.