Job for pushing to docker hub
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

This commit is contained in:
shockrah 2024-08-27 18:53:17 -07:00
parent d6a4b3314c
commit bb69d9f5ec

View File

@ -3,6 +3,8 @@ on:
push:
branches:
- master
env:
image: shockrah/hugo
jobs:
build-hugo-image:
@ -10,9 +12,16 @@ jobs:
steps:
- name: Check out repository code
uses: actions/checkout@v4
- name: General Docker Info
run: docker info
- name: Find all files in repo space
run: ls -lrt ${{ gitea.workspace }}
- name: Attempt a docker build
run: docker build -t shockrah/hugo ${{ gitea.workspace }}/website
- 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 }}