modify gitea
All checks were successful
Gitea Actions Demo / build-and-push (push) Successful in 13s
All checks were successful
Gitea Actions Demo / build-and-push (push) Successful in 13s
This commit is contained in:
@@ -19,7 +19,7 @@ jobs:
|
||||
version=$(python -c "import sys; sys.path.append('./backend'); from config.version import BASE_VERSION; print(BASE_VERSION)")
|
||||
current_date=$(date +%Y%m%d)
|
||||
if [ "${{ gitea.ref }}" == "refs/heads/master" ]; then
|
||||
echo "tag=latest-$version-$current_date" >> $GITHUB_OUTPUT
|
||||
echo "tag=$version" >> $GITHUB_OUTPUT
|
||||
else
|
||||
echo "tag=next-$version-$current_date" >> $GITHUB_OUTPUT
|
||||
fi
|
||||
@@ -49,7 +49,15 @@ jobs:
|
||||
- name: Push Backend Image to Gitea Registry
|
||||
run: |
|
||||
docker push ${{ steps.gitea_ip.outputs.ip }}:3000/ryan/backend:${{ steps.vars.outputs.tag }}
|
||||
if [ "${{ gitea.ref }}" == "refs/heads/master" ]; then
|
||||
docker tag ${{ steps.gitea_ip.outputs.ip }}:3000/ryan/backend:${{ steps.vars.outputs.tag }} ${{ steps.gitea_ip.outputs.ip }}:3000/ryan/backend:latest
|
||||
docker push ${{ steps.gitea_ip.outputs.ip }}:3000/ryan/backend:latest
|
||||
fi
|
||||
|
||||
- name: Push Frontend Image to Gitea Registry
|
||||
run: |
|
||||
docker push ${{ steps.gitea_ip.outputs.ip }}:3000/ryan/frontend:${{ steps.vars.outputs.tag }}
|
||||
if [ "${{ gitea.ref }}" == "refs/heads/master" ]; then
|
||||
docker tag ${{ steps.gitea_ip.outputs.ip }}:3000/ryan/frontend:${{ steps.vars.outputs.tag }} ${{ steps.gitea_ip.outputs.ip }}:3000/ryan/frontend:latest
|
||||
docker push ${{ steps.gitea_ip.outputs.ip }}:3000/ryan/frontend:latest
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user