pgweb/.github/workflows/docker.yml
Matt Burdan f3d6d9d73e
fix: Propagate CGO_ENABLED environment variable to docker build (#724)
* fix: Add ability to statically compile binaries

* propagate env var from github action

* fix comment
2024-03-26 22:44:58 -07:00

38 lines
759 B
YAML

name: docker
on:
push:
branches:
- master
env:
GO_VERSION: "1.22"
CGO_ENABLED: 0
IMAGE_REPOSITORY: sosedoff/pgweb
jobs:
docker-build:
name: docker images
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Configure docker build context
uses: docker/setup-buildx-action@v2
- name: Build docker images
uses: docker/build-push-action@v2
with:
context: .
push: false
tags: pgweb:latest
platforms: linux/amd64,linux/arm64,linux/arm/v7
build-args: |
"CGO_ENABLED=${{ env.CGO_ENABLED }}"