Skip to content

Commit

Permalink
ci: update
Browse files Browse the repository at this point in the history
  • Loading branch information
BrooksYang committed Mar 17, 2024
1 parent a4c8bbb commit 1f6f77c
Showing 1 changed file with 13 additions and 12 deletions.
25 changes: 13 additions & 12 deletions .github/workflows/staging.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -120,23 +120,24 @@ jobs:
key: ${{ secrets.REMOTE_KEY }}
script: |
mkdir -p /opt/bingo
cd /opt/bingo
rsync -a /tmp/build/docker/* ./
rsync -a /tmp/build/docker/.env.example ./
cd /opt/bingo || exit
tar -xzvpf /tmp/docker-compose.tar.gz -C ./
if [ ! -f .env ]; then
cp .env.example .env
cp .env.example .env
fi
if [ ! -f config/bingo-apiserver.yaml ]; then
cp config/bingo-apiserver.example.yaml config/bingo-apiserver.yaml
cp config/bingo-apiserver.example.yaml config/bingo-apiserver.yaml
fi
# Update app version by .env
sed -i 's/APP_VERSION=.*/APP_VERSION=${{ env.VERSION }}/g' .env
docker load < /tmp/bingo-apiserver.tar.gz
if [ -n "${{ env.VERSION }}" ]; then
sed -i "s/APP_VERSION=.*/APP_VERSION=${tag}/g" .env
fi
docker load </tmp/bingo-apiserver.tar.gz
docker-compose up -d
rm -rf /tmp/build
rm /tmp/docker-compose.tar.gz
rm /tmp/bingo-apiserver.tar.gz
rm config/bingo-apiserver.example.yaml

0 comments on commit 1f6f77c

Please sign in to comment.