3 Commits

Author SHA1 Message Date
c7ca9f9442 🔧 (.gitea/workflows/on_release.yml): Add echo command to print TOKEN for debugging purposes
Some checks failed
Build / Code quality (push) Has been cancelled
Creates a docker image for production / Build the docker image (push) Successful in 39s
2025-02-05 10:44:57 -03:00
9c6db02e57 🔧 (on_release.yml): Add echo statement to print github ref_name and run_number for better debugging
Some checks are pending
Build / Code quality (push) Waiting to run
Creates a docker image for production / Build the docker image (push) Successful in 12s
♻️ (on_release.yml): Remove redundant curl command to clean up the code and improve readability
2025-02-05 10:42:24 -03:00
d6cd731a2a Fix no release
Some checks failed
Creates a docker image for production / Build the docker image (push) Successful in 9s
Build / Code quality (push) Has been cancelled
2025-02-05 10:39:52 -03:00

View File

@@ -34,32 +34,24 @@ jobs:
labels: ${{ steps.meta.outputs.labels }}
- name: Deploy to production server
run: |
echo "${{ github.ref_name }} - ${{ github.run_number }}"
TOKEN=$(curl --silent --location 'https://auth.makecodes.dev/auth' \
--header 'Content-Type: application/json' \
--data '{
"email": "'$USERNAME'",
"password": "'$PASSWORD'"
}' | jq -r '.token')
echo $TOKEN
curl --location --silent 'https://deployer.makecodes.dev/deploy' \
--header 'Content-Type: application/json' \
--header "Authorization: Bearer $TOKEN" \
--data '{
"image": "docker.nexus.makecodes.dev/mines/backend",
"service": "nfe-vision_app",
"service": "mines_backend",
"version": "${{ github.ref_name }}",
"pipeline": "${{ github.run_number }}",
"repository": "mines/backend"
}'
# curl --location --silent 'https://deployer.makecodes.dev/deploy' \
# --header 'Content-Type: application/json' \
# --header "Authorization: Bearer $TOKEN" \
# --data '{
# "image": "docker.nexus.makecodes.dev/makecodes/nfe-vision",
# "service": "nfe-vision_worker",
# "version": "${{ github.ref_name }}",
# "pipeline": "${{ github.run_number }}",
# "repository": "makecodes/nfe-vision"
# }'
env:
USERNAME: ${{ secrets.SERVER_AUTH_USERNAME }}
PASSWORD: ${{ secrets.SERVER_AUTH_PASSWORD }}