2024-08-19 12:56:20 +00:00
|
|
|
name: Build Docker Image
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- main
|
|
|
|
pull_request:
|
|
|
|
branches:
|
|
|
|
- main
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
env:
|
|
|
|
GOPRIVATE: git.wittern.io/public/echo-todos
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v4
|
|
|
|
- uses: actions/setup-go@v5
|
|
|
|
with:
|
|
|
|
go-version: '^1.22.5'
|
|
|
|
- run: go version
|
2024-08-19 13:27:17 +00:00
|
|
|
- name: Login to Package Registry
|
|
|
|
uses: docker/login-action@v2
|
|
|
|
with:
|
|
|
|
registry: git.wittern.io
|
|
|
|
username: ${{ secrets.DOCKER_USERNAME }}
|
|
|
|
password: ${{ secrets.DOCKER_PASSWORD }}
|
2024-08-19 12:56:20 +00:00
|
|
|
- name: Build the Docker image
|
|
|
|
run: |
|
|
|
|
go install github.com/a-h/templ/cmd/templ@latest
|
|
|
|
templ generate
|
|
|
|
docker build . --file Dockerfile --tag git.wittern.io/public/echo-todos
|
|
|
|
docker push git.wittern.io/public/echo-todos
|