echo-todos/.github/workflows/build.yml

28 lines
739 B
YAML
Raw Normal View History

2024-08-19 12:56:20 +00:00
name: Build Docker Image
on:
push:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
2024-08-19 14:03:05 +00:00
- uses: actions/setup-go@v5
with:
go-version: '^1.22.5'
2024-08-19 13:53:34 +00:00
- name: Login to GitHub Container Registry
2024-08-19 13:50:27 +00:00
uses: docker/login-action@v3
2024-08-19 13:27:17 +00:00
with:
registry: git.wittern.io
2024-08-19 13:50:27 +00:00
username: ${{ github.actor }}
2024-08-19 13:27:17 +00:00
password: ${{ secrets.DOCKER_PASSWORD }}
2024-08-19 14:03:05 +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:latest
docker push git.wittern.io/public/echo-todos