33 lines
863 B
YAML
33 lines
863 B
YAML
name: Build and Publish Runner Image
|
|
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
paths:
|
|
- "Dockerfile"
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
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
|