Skip to content

feat: docker 支持自定义 api.json #25

feat: docker 支持自定义 api.json

feat: docker 支持自定义 api.json #25

Workflow file for this run

name: "build image"
on:
push:
tags:
- "v*"
jobs:
build:
runs-on: ubuntu-latest
if: github.repository == 'xiaoxuan6/SMSBombing'
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Build
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
VERSION=$(echo "${{ github.ref }}" | sed -e 's,.*/\(.*\),\1,')
echo "输出版本号:$VERSION"
docker build -t ghcr.io/xiaoxuan6/sms-bombing:latest .
docker login ghcr.io -u ${{ github.actor }} -p $GITHUB_TOKEN
docker push ghcr.io/xiaoxuan6/sms-bombing:latest
docker tag ghcr.io/xiaoxuan6/sms-bombing:latest ghcr.io/xiaoxuan6/sms-bombing:$VERSION
docker push ghcr.io/xiaoxuan6/sms-bombing:$VERSION
docker logout