Job for pushing to docker hub
This commit is contained in:
parent
d6a4b3314c
commit
bb69d9f5ec
@ -3,6 +3,8 @@ on:
|
|||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- master
|
- master
|
||||||
|
env:
|
||||||
|
image: shockrah/hugo
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build-hugo-image:
|
build-hugo-image:
|
||||||
@ -10,9 +12,16 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- name: Check out repository code
|
- name: Check out repository code
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
- name: General Docker Info
|
- name: Build docker image
|
||||||
run: docker info
|
run: docker build -t ${{ env.image }} ${{ gitea.workspace }}/website
|
||||||
- name: Find all files in repo space
|
push-to-docker-hub:
|
||||||
run: ls -lrt ${{ gitea.workspace }}
|
needs: build-hugo-image
|
||||||
- name: Attempt a docker build
|
runs-on: ubuntu-latest
|
||||||
run: docker build -t shockrah/hugo ${{ gitea.workspace }}/website
|
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 }}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user