init: first commit
This commit is contained in:
38
.gitea/workflows/publish-image.yml
Normal file
38
.gitea/workflows/publish-image.yml
Normal file
@@ -0,0 +1,38 @@
|
||||
name: Publish morthimer/website image
|
||||
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- '[0-9]+.[0-9]+.[0-9]+'
|
||||
|
||||
jobs:
|
||||
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:
|
||||
runs-on: ubuntu-latest
|
||||
needs: lint
|
||||
steps:
|
||||
- name: Repository login
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
registry: ${{ secrets.DOCKER_REGISTRY }}
|
||||
username: ${{ secrets.DOCKER_USERNAME }}
|
||||
password: ${{ secrets.DOCKER_PASSWORD }}
|
||||
|
||||
- name: Build and push image
|
||||
uses: docker/build-push-action@v5
|
||||
with:
|
||||
push: true
|
||||
tags: |
|
||||
${{ secrets.DOCKER_REGISTRY }}/${{ gitea.repository }}:latest
|
||||
${{ secrets.DOCKER_REGISTRY }}/${{ gitea.repository }}:${{ gitea.tag }}
|
||||
build-args: |
|
||||
img_ver=${{ gitea.tag }}
|
||||
Reference in New Issue
Block a user