This commit is contained in:
parent
986e7d52f1
commit
2f2a19d982
25
.gitea/workflows/build.yml
Normal file
25
.gitea/workflows/build.yml
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
name: build
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: [main]
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Build & push iloom-frontend
|
||||||
|
run: |
|
||||||
|
set -eo pipefail
|
||||||
|
REG=localhost:3000/kaezhou
|
||||||
|
TAG=dev-$(echo "${{ github.sha }}" | cut -c1-8)
|
||||||
|
workdir=$(mktemp -d)
|
||||||
|
git clone "http://kaezhou:${{ secrets.REGISTRY_TOKEN }}@localhost:3000/kaezhou/iloom-flatten.git" "$workdir"
|
||||||
|
cd "$workdir"; git checkout "${{ github.sha }}"
|
||||||
|
echo "${{ secrets.REGISTRY_TOKEN }}" | docker login localhost:3000 -u kaezhou --password-stdin
|
||||||
|
docker build --build-arg BASE_REGISTRY= \
|
||||||
|
-t "$REG/iloom-frontend:$TAG" -t "$REG/iloom-frontend:latest" .
|
||||||
|
docker push "$REG/iloom-frontend:$TAG"
|
||||||
|
docker push "$REG/iloom-frontend:latest"
|
||||||
|
rm -rf "$workdir"
|
||||||
|
echo "done: iloom-frontend pushed at $TAG + latest"
|
||||||
Loading…
x
Reference in New Issue
Block a user