fix: REPO_DOMAIN -> secrets.REPO_DOMAIN
All checks were successful
Build and push Docker image / build-and-push (push) Successful in 3m46s

This commit is contained in:
Jo 2024-01-08 00:41:28 +00:00
parent e372802a15
commit 123fce455b

View file

@ -10,7 +10,7 @@ on:
# REPO_TOKEN: A gitea access token for the repo
# REGISTRY_USERNAME/PASSWORD: The username and password for the docker registry of choice
env:
DOCKER_REPO: ${{ REPO_DOMAIN }}/jo
DOCKER_REPO: ${{ secrets.REPO_DOMAIN }}/jo
DOCKER_TAG: latest
GITEA_REPO: jo/expresstemplate
GITEA_TOKEN: ${{ secrets.REPO_TOKEN }}
@ -37,19 +37,19 @@ jobs:
- name: Login to Docker registry
uses: docker/login-action@v1
with:
registry: ${{ REPO_DOMAIN }}
registry: ${{ secrets.REPO_DOMAIN }}
username: ${{ secrets.REGISTRY_USERNAME }}
password: ${{ secrets.REGISTRY_PASSWORD }}
- name: Build Docker image
run: |
docker build -t ${DOCKER_REPO}:${DOCKER_TAG} .
docker tag ${DOCKER_REPO}:${DOCKER_TAG} ${{ REPO_DOMAIN }}/${GITEA_REPO}:${DOCKER_TAG}
docker tag ${DOCKER_REPO}:${DOCKER_TAG} ${{ secrets.REPO_DOMAIN }}/${GITEA_REPO}:${DOCKER_TAG}
- name: Push Docker image to Gitea package
run: |
docker push ${{ REPO_DOMAIN }}/${GITEA_REPO}:${DOCKER_TAG}
docker push ${{ secrets.REPO_DOMAIN }}/${GITEA_REPO}:${DOCKER_TAG}
curl -X POST -H "Authorization: token ${GITEA_TOKEN}" \
-H "Content-Type: application/json" \
-d '{"tag_name": "'"${DOCKER_TAG}"'"}' \
https://${{ REPO_DOMAIN }}/api/v1/repos/${GITEA_REPO}/releases
https://${{ secrets.REPO_DOMAIN }}/api/v1/repos/${GITEA_REPO}/releases