Building ansible image now
This commit is contained in:
parent
3bd16a1efd
commit
79835d2560
29
.gitea/workflows/ansible-builder.yml
Normal file
29
.gitea/workflows/ansible-builder.yml
Normal 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 }}
|
||||||
|
|
@ -1,5 +1,5 @@
|
|||||||
# Inpsired by William Yeh's Docker image however this one is kept up to date
|
# Inpsired by William Yeh's Docker image however this one is kept up to date
|
||||||
# with the latest base image versions available
|
# with the latest base image versions available, and includes ansible-lint
|
||||||
|
|
||||||
FROM alpine:latest
|
FROM alpine:latest
|
||||||
|
|
||||||
@ -10,7 +10,7 @@ RUN apk --update add sudo python3 openssl ca-certificates openssh-client rsync &
|
|||||||
python3-dev libffi-dev openssl-dev build-base && \
|
python3-dev libffi-dev openssl-dev build-base && \
|
||||||
python3 -m ensurepip && \
|
python3 -m ensurepip && \
|
||||||
pip3 install --upgrade pip cffi && \
|
pip3 install --upgrade pip cffi && \
|
||||||
pip3 install ansible && \
|
pip3 install ansible ansible-lint && \
|
||||||
apk del build-dependencies && \
|
apk del build-dependencies && \
|
||||||
rm -rf /var/cache/apk/* && \
|
rm -rf /var/cache/apk/* && \
|
||||||
mkdir -p /etc/ansible && \
|
mkdir -p /etc/ansible && \
|
||||||
|
Loading…
Reference in New Issue
Block a user