This commit is contained in:
48
.gitea/workflows/build.yaml
Normal file
48
.gitea/workflows/build.yaml
Normal file
@@ -0,0 +1,48 @@
|
||||
name: Build
|
||||
run-name: Build Docker Image
|
||||
on: [push, pull_request]
|
||||
|
||||
jobs:
|
||||
|
||||
build:
|
||||
|
||||
runs-on: ubuntu-20.04
|
||||
|
||||
env:
|
||||
VERSION: 1.16.0
|
||||
|
||||
steps:
|
||||
|
||||
- name: Install docker
|
||||
uses: papodaca/install-docker-action@main
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v3
|
||||
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Login into Registry
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
registry: https://git.prettyhefty.com
|
||||
username: ${{ gitea.repository_owner }}
|
||||
password: ${{ secrets.REGISTRY_TOKEN }}
|
||||
|
||||
- name: Prepare Meta
|
||||
id: prepare
|
||||
run: |
|
||||
PLATFORM="linux/amd64"
|
||||
REPO=${{ gitea.repository }}
|
||||
|
||||
echo ::set-output name=build_date::$(date -u +'%Y-%m-%dT%H:%M:%SZ')
|
||||
echo ::set-output name=docker_platform::${PLATFORM}
|
||||
echo ::set-output name=repository::${REPO,,}
|
||||
echo ::set-output name=version::${VERSION}
|
||||
|
||||
- name: Build Docker image
|
||||
uses: docker/build-push-action@v6
|
||||
with:
|
||||
platforms: ${{ steps.prepare.outputs.docker_platform }}
|
||||
push: true
|
||||
tags: git.prettyhefty.com/${{ steps.prepare.outputs.repository }}:${{ steps.prepare.outputs.version }}
|
||||
Reference in New Issue
Block a user