mirror of
https://github.com/Heretek-AI/Heretek-ProxmoxVE.git
synced 2026-10-11 21:09:51 +00:00
42 lines
1.3 KiB
YAML
Generated
42 lines
1.3 KiB
YAML
Generated
name: Build and Publish Docker Image
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
paths:
|
|
- '.github/runner/docker/**'
|
|
schedule:
|
|
- cron: '0 0 * * *'
|
|
|
|
jobs:
|
|
build:
|
|
if: github.repository == 'Heretek-AI/ProxmoxVE'
|
|
runs-on: ubuntu-latest #To ensure it always builds we use the github runner with all the right tooling
|
|
permissions:
|
|
contents: read
|
|
packages: write
|
|
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Log in to GHCR
|
|
uses: docker/login-action@v3
|
|
with:
|
|
registry: ghcr.io
|
|
username: ${{ github.actor }}
|
|
password: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
- name: Build Docker image
|
|
run: |
|
|
repo_name=${{ github.repository }} # Get repository name
|
|
repo_name_lower=$(echo $repo_name | tr '[:upper:]' '[:lower:]') # Convert to lowercase
|
|
docker build -t ghcr.io/$repo_name_lower/gh-runner-self:latest -f .github/runner/docker/gh-runner-self.dockerfile .
|
|
|
|
- name: Push Docker image to GHCR
|
|
run: |
|
|
repo_name=${{ github.repository }} # Get repository name
|
|
repo_name_lower=$(echo $repo_name | tr '[:upper:]' '[:lower:]') # Convert to lowercase
|
|
docker push ghcr.io/$repo_name_lower/gh-runner-self:latest
|