Use Gitea job token for registry
Some checks failed
Build and deploy Flutter Web / build (push) Failing after 6s
Some checks failed
Build and deploy Flutter Web / build (push) Failing after 6s
This commit is contained in:
@@ -5,6 +5,10 @@ on:
|
|||||||
branches:
|
branches:
|
||||||
- main
|
- main
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
packages: write
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
runs-on: build-host
|
runs-on: build-host
|
||||||
@@ -17,8 +21,8 @@ jobs:
|
|||||||
|
|
||||||
- name: Log in to Gitea registry
|
- name: Log in to Gitea registry
|
||||||
run: |
|
run: |
|
||||||
echo "${{ secrets.REGISTRY_TOKEN }}" | docker login gitea.dsrptlab.com \
|
echo "${{ secrets.GITEA_TOKEN }}" | docker login gitea.dsrptlab.com \
|
||||||
-u "${{ secrets.REGISTRY_USERNAME }}" \
|
-u "${{ github.actor }}" \
|
||||||
--password-stdin
|
--password-stdin
|
||||||
|
|
||||||
- name: Build and push image
|
- name: Build and push image
|
||||||
@@ -47,7 +51,7 @@ jobs:
|
|||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
[ -f .deploy-current ] || exit 0
|
[ -f .deploy-current ] || exit 0
|
||||||
payload=$(cat <<JSON
|
payload=$(cat <<JSON
|
||||||
{"applicationId":"$DOKPLOY_APPLICATION_ID","dockerImage":"$IMAGE","username":"${{ secrets.REGISTRY_USERNAME }}","password":"${{ secrets.REGISTRY_TOKEN }}","registryUrl":"gitea.dsrptlab.com"}
|
{"applicationId":"$DOKPLOY_APPLICATION_ID","dockerImage":"$IMAGE","username":"${{ github.actor }}","password":"${{ secrets.GITEA_TOKEN }}","registryUrl":"gitea.dsrptlab.com"}
|
||||||
JSON
|
JSON
|
||||||
)
|
)
|
||||||
curl -fsS -X POST "${{ secrets.DOKPLOY_URL }}/api/application.saveDockerProvider" \
|
curl -fsS -X POST "${{ secrets.DOKPLOY_URL }}/api/application.saveDockerProvider" \
|
||||||
|
|||||||
Reference in New Issue
Block a user