ushare/.gitea/workflows/build.yaml
loveuer 6da6688677
All checks were successful
/ build and run u-api (push) Successful in 2s
/ clean (push) Successful in 1s
fix: v0.1.2
2025-05-10 10:51:13 +08:00

49 lines
1.2 KiB
YAML

run-name: build ushare
on:
push:
tags:
- 'v*'
jobs:
build and run u-api:
runs-on: tencent-sg
steps:
- name: prepare enviroment
uses: actions/checkout@v4
- name: prints date
run: date '+%Y-%m-%dT%H:%M:%S'
- name: print operator
run: whoami
- name: print work dir and files
run: pwd & ls -alsh .
- name: print tag name
run: echo "Tag name = ${{ gitea.ref_name }}"
- name: build prepare config
run: |
cat << EOF > .docker.config.json
${{ secrets.DOCKER_CONFIG }}
EOF
- name: build by kaniko in docker
run: |
docker version
# run: |
# docker run --rm -v $(pwd):/workspace \
# -v $(pwd)/.docker.config.json:/kaniko/.docker/config.json:ro \
# gcr.io/kaniko-project/executor:latest \
# '-f /workspace/Dockerfile' \
# '-d "gitea.loveuer.com/loveuer/build/ushare:${{ gitea.ref_name }}"' \
# '--single-snapshot'
clean:
if: always()
runs-on: tencent-sg
steps:
- name: clean docker config
run: |
rm -rf .docker.config.json