Update to go-1.22 #33
Workflow file for this run
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 Image from master | |
on: | |
pull_request: | |
branches: | |
- master | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Figure out if running fork PR | |
id: fork | |
run: '["${{ secrets.DOCKER_REGISTRY_TOKEN }}" == ""] && echo "::set-output name=is_fork_pr::true" || echo "::set-output name=is_fork_pr::false"' | |
- name: Docker Login | |
uses: docker/login-action@v3 | |
with: | |
registry: ${{ secrets.DOCKER_REGISTRY }} | |
username: ${{ secrets.DOCKER_REGISTRY_USER }} | |
password: ${{ secrets.DOCKER_REGISTRY_TOKEN }} | |
if: steps.fork.outputs.is_fork_pr == 'false' | |
- name: Install libsystemd headers | |
run: sudo apt-get update && sudo apt-get install libsystemd-dev | |
- name: Set up Go 1.22 | |
uses: actions/setup-go@v5 | |
with: | |
go-version: "1.22" | |
cache: false | |
id: go | |
- name: Lint | |
uses: golangci/golangci-lint-action@v4 | |
with: | |
args: -p bugs -p unused --timeout=3m | |
- name: Docker Login | |
uses: docker/login-action@v3 | |
with: | |
registry: ${{ secrets.DOCKER_REGISTRY }} | |
username: ${{ secrets.DOCKER_REGISTRY_USER }} | |
password: ${{ secrets.DOCKER_REGISTRY_TOKEN }} | |
- name: Build the Docker images | |
run: | | |
# pull request images are prefixed with 'pr' to prevent them from overriding released images | |
export GITHUB_TAG_NAME=pr-${GITHUB_HEAD_REF##*/} | |
make dockerimage | |
make dockerpush | |
if: steps.fork.outputs.is_fork_pr == 'false' |