Fix: use GITHUB_OUTPUT instead of GITEA_OUTPUT in CI/CD workflow
Docker Build and Push / build-and-push (push) Canceled after 0s
Docker Build and Push / build-and-push (push) Canceled after 0s
Gitea Actions uses GITHUB_OUTPUT to set step outputs, not GITEA_OUTPUT. This was causing version and minor variables to be empty, so only the 'latest' tag was pushed to the registry. Added debug logging to help diagnose future issues. Co-authored-by: Junie <junie@jetbrains.com>
This commit is contained in:
@@ -21,13 +21,15 @@ jobs:
|
|||||||
- name: Extract version from tag
|
- name: Extract version from tag
|
||||||
id: version
|
id: version
|
||||||
run: |
|
run: |
|
||||||
# Remove 'v' prefix from tag (e.g., v0.1.0 → 0.1.0)
|
# Remove 'refs/tags/v' prefix from tag (e.g., refs/tags/v0.1.0 → 0.1.0)
|
||||||
VERSION=$(echo "${{ gitea.ref }}" | sed 's|refs/tags/v||')
|
VERSION=$(echo "${{ gitea.ref }}" | sed 's|refs/tags/v||')
|
||||||
echo "version=${VERSION}" >> "${GITEA_OUTPUT}"
|
echo "Extracted version: ${VERSION}"
|
||||||
|
echo "version=${VERSION}" >> "${GITHUB_OUTPUT}"
|
||||||
|
|
||||||
# Extract major.minor for minor tag (e.g., 0.1.0 → 0.1)
|
# Extract major.minor for minor tag (e.g., 0.1.0 → 0.1)
|
||||||
MINOR=$(echo "${VERSION}" | sed 's/\.[0-9]*$//')
|
MINOR=$(echo "${VERSION}" | sed 's/\.[0-9]*$//')
|
||||||
echo "minor=${MINOR}" >> "${GITEA_OUTPUT}"
|
echo "Extracted minor: ${MINOR}"
|
||||||
|
echo "minor=${MINOR}" >> "${GITHUB_OUTPUT}"
|
||||||
|
|
||||||
- name: Set up Docker Buildx
|
- name: Set up Docker Buildx
|
||||||
uses: docker/setup-buildx-action@v3
|
uses: docker/setup-buildx-action@v3
|
||||||
|
|||||||
Reference in New Issue
Block a user