Skip to content

Commit

Permalink
docker alpine->google-distroless
Browse files Browse the repository at this point in the history
  • Loading branch information
jpillora authored and NewtonMan committed Oct 15, 2024
1 parent af32801 commit cb030e3
Showing 1 changed file with 21 additions and 25 deletions.
46 changes: 21 additions & 25 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,40 +11,33 @@ jobs:
name: Build & Test
strategy:
matrix:
go-version: [1.21.x]
platform: [ubuntu-latest]
go-version: [1.16.x, 1.17.x, 1.18.x, 1.19.x]
platform: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.platform }}
steps:
- name: Install Go
uses: actions/setup-go@v3
with:
go-version: ${{ matrix.go-version }}
- name: Checkout code
uses: actions/checkout@v3.1.0
uses: actions/checkout@v3
- name: Build
run: go build -v -o /dev/null .
- name: Test
run: go test -v ./...
# ================
# RELEASE BINARIES (on push "v*" tag)
# ================
release_binaries:
name: Release Binaries
env:
GODEBUG: x509ignoreCN=0
# ================
# RELEASE JOB
# RELEASE JOBS
# runs after a success test
# only runs on push "v*" tag
# ================
release:
name: Release
release_binaries:
name: Release Binaries
needs: test
if: startsWith(github.ref, 'refs/tags/v')
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v3.1.0
uses: actions/checkout@v3
- name: goreleaser
if: success()
uses: docker://goreleaser/goreleaser:latest
Expand Down Expand Up @@ -96,6 +89,14 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
args: release --config .github/goreleaser.yml
release_docker:
name: Release Docker Images
needs: test
if: startsWith(github.ref, 'refs/tags/v')
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v3
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
- name: Set up Docker Buildx
Expand All @@ -108,21 +109,16 @@ jobs:
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Docker meta
id: docker_meta
uses: crazy-max/ghaction-docker-meta@v1
uses: docker/metadata-action@v4
with:
images: jpillora/chisel
tag-latest: true
# Outputs:
# jpillora/chisel:1.2.3
# jpillora/chisel:1.2
# jpillora/chisel:1
# jpillora/chisel:latest
tag-semver: |
{{version}}
{{major}}.{{minor}}
{{major}}
tags: |
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=semver,pattern={{major}}
- name: Build and push
uses: docker/build-push-action@v2
uses: docker/build-push-action@v3
with:
context: .
platforms: linux/amd64,linux/arm64,linux/ppc64le,linux/386,linux/arm/v7,linux/arm/v6
Expand Down

0 comments on commit cb030e3

Please sign in to comment.