diff --git a/.gitea/workflows/hugo-builder.yml b/.gitea/workflows/hugo-builder.yml index eff42fc..e09de4f 100644 --- a/.gitea/workflows/hugo-builder.yml +++ b/.gitea/workflows/hugo-builder.yml @@ -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 }} +