dockers/.gitea/workflows/hugo-builder.yml

28 lines
698 B
YAML
Raw Normal View History

2024-08-27 03:52:57 +00:00
name: Build Hugo Image
on:
push:
branches:
- master
2024-08-28 01:53:17 +00:00
env:
image: shockrah/hugo
2024-08-27 03:52:57 +00:00
jobs:
build-hugo-image:
2024-08-27 22:57:59 +00:00
runs-on: ubuntu-latest
2024-08-27 03:52:57 +00:00
steps:
2024-08-28 01:08:45 +00:00
- name: Check out repository code
uses: actions/checkout@v4
2024-08-28 01:53:17 +00:00
- name: Build docker image
run: docker build -t ${{ env.image }} ${{ gitea.workspace }}/website
push-to-docker-hub:
needs: build-hugo-image
runs-on: ubuntu-latest
steps:
- name: Login to Docker Hub
run: |
echo "${{ secrets.dockerhub_pass }}" | \
docker login -u ${{ secrets.dockerhub_user }} --password-stdin
- name: Push Docker image from previous job
run: docker push ${{ env.image }}