From 4eb8324056d814d61bb275ba279dad7dd7402d6f Mon Sep 17 00:00:00 2001 From: Huy Nguyen Date: Fri, 7 Nov 2025 21:50:27 +1030 Subject: [PATCH] Vars instead of env --- .gitea/workflows/build-and-push.yaml | 18 +++++++++--------- .gitea/workflows/ci.yaml | 6 +++--- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/.gitea/workflows/build-and-push.yaml b/.gitea/workflows/build-and-push.yaml index 418f342..6a94bf6 100644 --- a/.gitea/workflows/build-and-push.yaml +++ b/.gitea/workflows/build-and-push.yaml @@ -61,9 +61,9 @@ jobs: # do not push yet push: false tags: | - ${{ env.REGISTRY_HOST }}/${{ steps.github_repository_to_lowercase.outputs.lowercase }}:${{ github.sha }} - ${{ env.REGISTRY_HOST }}/${{ steps.github_repository_to_lowercase.outputs.lowercase }}:${{ github.ref_name }} - ${{ env.REGISTRY_HOST }}/${{ github.repositorysteps.github_repository_to_lowercase.outputs.lowercase }}:latest + ${{ vars.REGISTRY_HOST }}/${{ steps.github_repository_to_lowercase.outputs.lowercase }}:${{ github.sha }} + ${{ vars.REGISTRY_HOST }}/${{ steps.github_repository_to_lowercase.outputs.lowercase }}:${{ github.ref_name }} + ${{ vars.REGISTRY_HOST }}/${{ github.repositorysteps.github_repository_to_lowercase.outputs.lowercase }}:latest build-args: | # Add any build args here # ARG_NAME=VALUE @@ -78,9 +78,9 @@ jobs: file: Dockerfile push: true tags: | - ${{ env.REGISTRY_HOST }}/${{ github.repository }}:${{ github.sha }} - ${{ env.REGISTRY_HOST }}/${{ github.repository }}:${{ github.ref_name }} - ${{ env.REGISTRY_HOST }}/${{ github.repository }}:latest + ${{ vars.REGISTRY_HOST }}/${{ github.repository }}:${{ github.sha }} + ${{ vars.REGISTRY_HOST }}/${{ github.repository }}:${{ github.ref_name }} + ${{ vars.REGISTRY_HOST }}/${{ github.repository }}:latest # ------------------------------------------------------------------ # 6. (Optional) Clean up local Docker cache @@ -95,6 +95,6 @@ jobs: - name: Show pushed image tags run: | echo "Pushed image tags:" - echo "- ${{ env.REGISTRY_HOST }}/${{ github.repository }}:${{ github.sha }}" - echo "- ${{ env.REGISTRY_HOST }}/${{ github.repository }}:${{ github.ref_name }}" - echo "- ${{ env.REGISTRY_HOST }}/${{ github.repository }}:latest" \ No newline at end of file + echo "- ${{ vars.REGISTRY_HOST }}/${{ github.repository }}:${{ github.sha }}" + echo "- ${{ vars.REGISTRY_HOST }}/${{ github.repository }}:${{ github.ref_name }}" + echo "- ${{ vars.REGISTRY_HOST }}/${{ github.repository }}:latest" \ No newline at end of file diff --git a/.gitea/workflows/ci.yaml b/.gitea/workflows/ci.yaml index bd2185b..21851ee 100644 --- a/.gitea/workflows/ci.yaml +++ b/.gitea/workflows/ci.yaml @@ -33,9 +33,9 @@ jobs: # do not push yet push: false tags: | - ${{ env.REGISTRY_HOST }}/${{ steps.github_repository_to_lowercase.outputs.lowercase }}:${{ github.sha }} - ${{ env.REGISTRY_HOST }}/${{ steps.github_repository_to_lowercase.outputs.lowercase }}:${{ github.ref_name }} - ${{ env.REGISTRY_HOST }}/${{ steps.github_repository_to_lowercase.outputs.lowercase }}:latest + ${{ vars.REGISTRY_HOST }}/${{ steps.github_repository_to_lowercase.outputs.lowercase }}:${{ github.sha }} + ${{ vars.REGISTRY_HOST }}/${{ steps.github_repository_to_lowercase.outputs.lowercase }}:${{ github.ref_name }} + ${{ vars.REGISTRY_HOST }}/${{ steps.github_repository_to_lowercase.outputs.lowercase }}:latest build-args: | # Add any build args here # ARG_NAME=VALUE \ No newline at end of file