dockers/.gitea/workflows/ansible-builder.yml
shockrah a54ded29e8
Some checks failed
Build Ansible Image / build-ansible-image (push) Failing after 19s
Build Ansible Image / push-to-docker-hub (push) Failing after 2s
Fixing push paths
2024-09-29 18:24:09 -07:00

30 lines
738 B
YAML

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 }}