49 lines
1.1 KiB
YAML
49 lines
1.1 KiB
YAML
name: Build on Commit
|
|
run-name: Build
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- "main"
|
|
|
|
env:
|
|
REGISTRY: gitea.taco.quest
|
|
IMAGE_NAME: ${{ gitea.repository }}
|
|
GITHUB_TOKEN: ""
|
|
|
|
jobs:
|
|
build-and-push-image:
|
|
runs-on: ubuntu-latest
|
|
|
|
# permissions:
|
|
# contents: read
|
|
# packages: write
|
|
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v4.1.1
|
|
|
|
- name: Prepare the container
|
|
run: curl -fsSL https://get.docker.com -o get-docker.sh && sh ./get-docker.sh
|
|
|
|
- name: Log in to registry
|
|
uses: docker/login-action@v3.0.0
|
|
with:
|
|
registry: ${{ env.REGISTRY }}
|
|
username: ${{ gitea.actor }}
|
|
password: ${{ secrets.AUTH_TOKEN }}
|
|
|
|
- name: Extract metadata for registry
|
|
id: meta
|
|
uses: docker/metadata-action@v5.5.0
|
|
with:
|
|
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
|
|
|
|
- name: Build and push Docker image
|
|
uses: docker/build-push-action@v5
|
|
with:
|
|
context: .
|
|
push: true
|
|
tags: "gitea.taco.quest/mindfang/pterodactyl-panel:latest"
|
|
labels: ${{ steps.meta.outputs.labels }}
|