Adding gitea workflows
Some checks failed
gds-mock-mcp Docker Build / build (pull_request) Failing after 14m15s
Some checks failed
gds-mock-mcp Docker Build / build (pull_request) Failing after 14m15s
This commit is contained in:
46
.gitea/workflows/docker-build.yaml
Normal file
46
.gitea/workflows/docker-build.yaml
Normal file
@@ -0,0 +1,46 @@
|
|||||||
|
---
|
||||||
|
name: gds-mock-mcp Docker Build
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: [main]
|
||||||
|
tags: [v*]
|
||||||
|
pull_request:
|
||||||
|
branches: [main]
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Checkout code
|
||||||
|
uses: actions/checkout@v6
|
||||||
|
- name: Installs QEMU binaries for multi-platform emulation.
|
||||||
|
uses: docker/setup-qemu-action@v4
|
||||||
|
- name: Generates image tags and annotations from Git information.
|
||||||
|
id: meta
|
||||||
|
uses: docker/metadata-action@v6
|
||||||
|
with:
|
||||||
|
images: registry.mortons.site/gds-mock-mcp
|
||||||
|
tags: |
|
||||||
|
type=raw,value=latest,enable={{is_default_branch}}
|
||||||
|
type=semver,pattern={{version}}
|
||||||
|
type=semver,pattern={{major}}.{{minor}}
|
||||||
|
type=semver,pattern={{major}}
|
||||||
|
type=ref,event=branch
|
||||||
|
type=ref,event=pr
|
||||||
|
type=sha
|
||||||
|
- name: Login to registry
|
||||||
|
if: ${{ gitea.event_name != 'pull_request' }}
|
||||||
|
uses: docker/login-action@v4
|
||||||
|
with:
|
||||||
|
registry: registry.mortons.site
|
||||||
|
username: ${{ secrets.REGISTRY_USERNAME }}
|
||||||
|
password: ${{ secrets.REGISTRY_PASSWORD }}
|
||||||
|
- name: Configures a Docker Buildx builder instance.
|
||||||
|
uses: docker/setup-buildx-action@v4
|
||||||
|
- name: Builds and pushes the Docker image using the Buildx environment.
|
||||||
|
uses: docker/bake-action@v7
|
||||||
|
with:
|
||||||
|
push: ${{ gitea.event_name != 'pull_request' }}
|
||||||
|
files: |
|
||||||
|
./docker/docker-bake.hcl
|
||||||
|
cwd://${{ steps.meta.outputs.bake-file }}
|
||||||
|
targets: build
|
||||||
Reference in New Issue
Block a user