Building ansible image now

This commit is contained in:
2024-09-29 18:14:06 -07:00
parent 3bd16a1efd
commit 79835d2560
2 changed files with 31 additions and 2 deletions

View File

@@ -0,0 +1,29 @@
name: Build Ansible Image
on:
push:
branches:
- master
paths:
- ansible
env:
image: shockrah/ansible
jobs:
build-ansible-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 }}/ansible
push-to-docker-hub:
needs: bulid-anisble-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 }}