Merge pull request #77 from dtantsur/keepalived #28
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: Building and testing | |
on: | |
push: | |
branches: ["main"] | |
pull_request: | |
branches: ["main"] | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Calculate go version | |
id: vars | |
run: echo "go_version=$(make go-version)" >> $GITHUB_OUTPUT | |
- name: Set up Go | |
uses: actions/setup-go@cdcb36043654635271a94b9a6d1392de5bb323a7 # v5.0.1 | |
with: | |
go-version: ${{ steps.vars.outputs.go_version }} | |
- name: Run unit tests | |
run: make test | |
container: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Update repositories | |
run: sudo apt update | |
- name: Install podman | |
run: sudo apt install -y podman | |
- name: Build the image | |
run: podman build . | |
manifests: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Calculate go version | |
id: vars | |
run: echo "go_version=$(make go-version)" >> $GITHUB_OUTPUT | |
- name: Set up Go | |
uses: actions/setup-go@cdcb36043654635271a94b9a6d1392de5bb323a7 # v5.0.1 | |
with: | |
go-version: ${{ steps.vars.outputs.go_version }} | |
- name: Generate manifests | |
run: make generate manifests | |
- name: Ensure there is no diff | |
run: git diff --exit-code |