Job for pushing to docker hub
This commit is contained in:
parent
d6a4b3314c
commit
bb69d9f5ec
@ -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 }}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user