Some checks failed
Build and Push Docker Image / build (push) Failing after 39s
Bake commit SHAs into the Docker image via CI and log them on server startup so it's easy to verify which version of schwab-scraper is running.
42 lines
1.1 KiB
YAML
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
|
|
cd vendor/schwab-scraper && git rev-parse HEAD > ../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
|