This commit is contained in:
30
.gitea/workflows/build-and-publish.yml
Normal file
30
.gitea/workflows/build-and-publish.yml
Normal file
@@ -0,0 +1,30 @@
|
||||
name: Build and Publish Runner Image
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [main, master]
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: runner
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Build Docker Image
|
||||
run: |
|
||||
docker build -t git.alexav.gg/${{ gitea.repository }}:latest .
|
||||
docker build -t git.alexav.gg/${{ gitea.repository }}:${{ gitea.sha }} .
|
||||
|
||||
- name: Login to Gitea Reg
|
||||
run: |
|
||||
echo "${{ secrets.RUNNER_TOKEN }}" | docker login git.alexav.gg -u ${{ gitea.actor }} --password-stdin
|
||||
|
||||
- name: Push Docker Image
|
||||
run: |
|
||||
docker push git.alexav.gg/${{ gitea.repository }}:latest
|
||||
docker push git.alexav.gg/${{ gitea.repository }}:${{ gitea.sha }}
|
||||
|
||||
- name: Cleanup
|
||||
run: docker logout git.alexav.gg
|
||||
17
Dockerfile
Normal file
17
Dockerfile
Normal file
@@ -0,0 +1,17 @@
|
||||
FROM node:18-bullseye
|
||||
|
||||
RUN apt-get update && \
|
||||
apt-get install -y \
|
||||
python3 \
|
||||
python3-pip \
|
||||
git \
|
||||
openssh-client \
|
||||
docker.io && \
|
||||
pip3 install ansible && \
|
||||
apt-get clean && \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
|
||||
RUN node --version && \
|
||||
npm --version && \
|
||||
ansible --version && \
|
||||
docker --version
|
||||
Reference in New Issue
Block a user