Add build workflow
This commit is contained in:
32
.gitea/workflows/build.yaml
Normal file
32
.gitea/workflows/build.yaml
Normal file
@@ -0,0 +1,32 @@
|
||||
name: Build morthimer/caddy-homelab image
|
||||
on: [push]
|
||||
env:
|
||||
REPOSITORY: git.int.morthimer.fr:8443
|
||||
|
||||
job:
|
||||
lint:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Repository checkout
|
||||
uses: actions/checkout@v4
|
||||
- name: Lint Dockerfile with Hadolint
|
||||
uses: hadolint/hadolint-action@v3.1.0
|
||||
with:
|
||||
dockerfile: Dockerfile
|
||||
|
||||
build:
|
||||
needs: lint
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Repository login
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
registry: $REPOSITORY
|
||||
username: ${{ secrets.DOCKER_USERNAME }}
|
||||
password: ${{ secrets.DOCKER_PASSWORD }}
|
||||
|
||||
- name: Build and push image
|
||||
uses: docker/build-push-action@v5
|
||||
with:
|
||||
push: true
|
||||
tags: $REPOSITORY/${{ gitea.repository }}:latest
|
||||
Reference in New Issue
Block a user