dockers/.gitea/workflows/hugo-builder.yml
shockrah bb69d9f5ec
All checks were successful
Build Hugo Image / build-hugo-image (push) Successful in 5s
Simple Docker Hello World Test / hello-world (push) Successful in 5s
Build Hugo Image / push-to-docker-hub (push) Successful in 12s
Job for pushing to docker hub
2024-08-27 18:53:17 -07:00

28 lines
698 B
YAML

name: Build Hugo Image
on:
push:
branches:
- master
env:
image: shockrah/hugo
jobs:
build-hugo-image:
runs-on: ubuntu-latest
steps:
- name: Check out repository code
uses: actions/checkout@v4
- 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 }}