Merge pull request #411 from zlabjp/unexport-resourceeventhandlerbuil… #931
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: build | |
on: | |
push: | |
branches: | |
- '**' | |
tags: | |
- v[0-9]+.[0-9]+.[0-9]+ | |
pull_request: | |
jobs: | |
build: | |
runs-on: ubuntu-24.04 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-go@v5 | |
with: | |
go-version: '1.22' | |
- uses: golangci/golangci-lint-action@v6 | |
- name: Build | |
run: | | |
make vet check controller | |
- name: Resolve image properties | |
uses: actions/github-script@v7 | |
id: imageprops | |
with: | |
script: | | |
core.setOutput('push', '${{ github.ref_type }}' == 'tag' || '${{ github.ref_name }}' == 'main') | |
core.setOutput('tag', '${{ github.ref_type }}' == 'tag' ? '${{ github.ref_name }}' : 'latest') | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Login to GitHub Container Registry | |
uses: docker/login-action@v3 | |
if: steps.imageprops.outputs.push == 'true' | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Build container image | |
uses: docker/build-push-action@v6 | |
with: | |
context: . | |
push: ${{ steps.imageprops.outputs.push == 'true' }} | |
tags: ghcr.io/zlabjp/nghttpx-ingress-controller:${{ steps.imageprops.outputs.tag }} | |
provenance: false |