ci: fetch envoy before generate step (#805) #527
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Docker Main | |
permissions: | |
contents: read | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
publish: | |
runs-on: | |
group: large-runners | |
labels: linux | |
steps: | |
- name: Checkout | |
uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 | |
with: | |
fetch-depth: 0 | |
- name: Docker meta | |
id: meta | |
uses: docker/metadata-action@96383f45573cb7f253c731d3b3ab81c87ef81934 | |
with: | |
# list of Docker images to use as base name for tags | |
images: | | |
pomerium/ingress-controller | |
# generate Docker tags based on the following events/attributes | |
tags: | | |
type=ref,event=branch | |
type=sha | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@f95db51fddba0c2d1ec667646a06c2ce06100226 | |
- name: Login to DockerHub | |
uses: docker/login-action@343f7c4344506bcbf9b4de18042ae17996df046d | |
with: | |
username: ${{ secrets.DOCKERHUB_USER }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- name: Build | |
run: | | |
TARGET=linux-amd64 scripts/get-envoy.bash | |
TARGET=linux-arm64 scripts/get-envoy.bash | |
make pomerium-ui generate fmt vet | |
mkdir -p bin-amd64 bin-arm64 | |
GOARCH=amd64 go build -tags embed_pomerium -o bin-amd64/manager main.go | |
GOARCH=arm64 go build -tags embed_pomerium -o bin-arm64/manager main.go | |
- name: Docker Publish - Main | |
uses: docker/build-push-action@0565240e2d4ab88bba5387d719585280857ece09 | |
with: | |
context: . | |
file: ./Dockerfile.ci | |
push: true | |
platforms: linux/amd64,linux/arm64 | |
tags: ${{ steps.meta.outputs.tags }} | |
labels: ${{ steps.meta.outputs.labels }} |