diff --git a/.gitea/workflows/build-and-push.yaml b/.gitea/workflows/build-and-push.yaml index 6a94bf6..1530e5e 100644 --- a/.gitea/workflows/build-and-push.yaml +++ b/.gitea/workflows/build-and-push.yaml @@ -18,7 +18,7 @@ jobs: id: github_repository_to_lowercase run: | # Grab the value (you can also use `${{ github.ref }}`, `${{ secrets.MY_SECRET }}`, etc.) - raw_value="${{ env.MY_VAR }}" + raw_value="${{ github.repository }}" # Convert to lower case lower_value=$(echo "$raw_value" | tr '[:upper:]' '[:lower:]') # Export it to the workflow environment @@ -78,9 +78,9 @@ jobs: file: Dockerfile push: true tags: | - ${{ vars.REGISTRY_HOST }}/${{ github.repository }}:${{ github.sha }} - ${{ vars.REGISTRY_HOST }}/${{ github.repository }}:${{ github.ref_name }} - ${{ vars.REGISTRY_HOST }}/${{ github.repository }}: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 # ------------------------------------------------------------------ # 6. (Optional) Clean up local Docker cache @@ -95,6 +95,6 @@ jobs: - name: Show pushed image tags run: | echo "Pushed image tags:" - 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 + echo "- ${{ vars.REGISTRY_HOST }}/${{ steps.github_repository_to_lowercase.outputs.lowercase }}:${{ github.sha }}" + echo "- ${{ vars.REGISTRY_HOST }}/${{ steps.github_repository_to_lowercase.outputs.lowercase }}:${{ github.ref_name }}" + echo "- ${{ vars.REGISTRY_HOST }}/${{ steps.github_repository_to_lowercase.outputs.lowercase }}:latest" \ No newline at end of file diff --git a/.gitea/workflows/ci.yaml b/.gitea/workflows/ci.yaml index 21851ee..5fc6d81 100644 --- a/.gitea/workflows/ci.yaml +++ b/.gitea/workflows/ci.yaml @@ -16,7 +16,7 @@ jobs: id: github_repository_to_lowercase run: | # Grab the value (you can also use `${{ github.ref }}`, `${{ secrets.MY_SECRET }}`, etc.) - raw_value="${{ env.MY_VAR }}" + raw_value="${{ github.repository }}" # Convert to lower case lower_value=$(echo "$raw_value" | tr '[:upper:]' '[:lower:]') # Export it to the workflow environment