Files
schwab-mcp-custom/.gitea/workflows/build.yaml
b3nw cc1226defe
All checks were successful
Build and Push Docker Image / build (push) Successful in 42s
fix(ci): use git -C instead of cd to avoid breaking working directory
The previous cd vendor/schwab-scraper caused the subsequent echo to write
mcp-server-commit.txt into the wrong path, which made the CI build fail.
2026-05-04 14:36:52 +00:00

42 lines
1.1 KiB
YAML

name: Build and Push Docker Image
on:
push:
branches:
- main
- master
jobs:
build:
runs-on: docker
container:
image: catthehacker/ubuntu:act-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Clone schwab-scraper
env:
CLONE_TOKEN: ${{ secrets.CRT_READ_ONLY }}
run: |
mkdir -p vendor
git clone --depth=1 --branch main \
"https://x-access-token:${CLONE_TOKEN}@gitea.ext.ben.io/b3nw/schwab-scraper.git" \
vendor/schwab-scraper
git -C vendor/schwab-scraper rev-parse HEAD > vendor/schwab-scraper-commit.txt
echo "${{ gitea.sha }}" > vendor/mcp-server-commit.txt
- name: Login to Gitea Container Registry
uses: docker/login-action@v2
with:
registry: gitea.ext.ben.io
username: ${{ gitea.actor }}
password: ${{ secrets.CR_PAT }}
- name: Build and Push
uses: docker/build-push-action@v4
with:
context: .
push: true
tags: gitea.ext.ben.io/${{ gitea.repository }}:latest