42 lines
831 B
YAML
Raw Normal View History

2023-11-17 04:54:54 +01:00
name: Build
2023-11-17 05:39:45 +01:00
on:
push:
branches:
- master
env:
go_version: 1.21
2023-11-17 04:54:54 +01:00
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
2023-11-17 05:39:45 +01:00
- name: Setup Go ${{ env.go_version }}
2023-11-17 04:54:54 +01:00
uses: actions/setup-go@v4
with:
2023-11-17 05:39:45 +01:00
go-version: ${{ env.go_version }}
2023-11-17 04:54:54 +01:00
cache-dependency-path: go.sum
- name: Install dependencies
run: go get .
- name: Build
run: go build ./...
2023-11-17 05:39:45 +01:00
- name: Log in to the Container registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v5
with:
push: true
tags: ghcr.io/${{ github.repository }}:latest