From 32b391d15dd750f786293155d42c0a53e468e3b1 Mon Sep 17 00:00:00 2001 From: Tobias Klemp Date: Thu, 1 Jan 2026 18:59:04 +0100 Subject: [PATCH 1/3] fix actions path --- .gitea/workflows/commentDeploy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitea/workflows/commentDeploy.yml b/.gitea/workflows/commentDeploy.yml index 98f3bf4..2b3dfc3 100644 --- a/.gitea/workflows/commentDeploy.yml +++ b/.gitea/workflows/commentDeploy.yml @@ -12,7 +12,7 @@ jobs: steps: - name: Get tag safe branch name id: branch_name - uses: ./.github/actions/getTagSafeRef + uses: ./.gitea/actions/getTagSafeRef - name: Print branch_name run: ${{ steps.branch_name.outputs.branch_name }} From c56f1f701fd2b058147859d56083b0d9bd25239c Mon Sep 17 00:00:00 2001 From: Tobias Klemp Date: Thu, 1 Jan 2026 19:28:41 +0100 Subject: [PATCH 2/3] test --- .gitea/workflows/commentDeploy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitea/workflows/commentDeploy.yml b/.gitea/workflows/commentDeploy.yml index 2b3dfc3..c7d39e0 100644 --- a/.gitea/workflows/commentDeploy.yml +++ b/.gitea/workflows/commentDeploy.yml @@ -12,7 +12,7 @@ jobs: steps: - name: Get tag safe branch name id: branch_name - uses: ./.gitea/actions/getTagSafeRef + uses: .gitea/actions/getTagSafeRef.yml - name: Print branch_name run: ${{ steps.branch_name.outputs.branch_name }} From 2c78aeedddf31abe9b0acefb655d430e82c05f6c Mon Sep 17 00:00:00 2001 From: Tobias Klemp Date: Thu, 1 Jan 2026 19:35:41 +0100 Subject: [PATCH 3/3] maybe fix --- .gitea/actions/getTagSafeRef.yml | 20 -------------------- .gitea/actions/getTagSafeRef/action.yml | 23 +++++++++++++++++++++++ .gitea/workflows/commentDeploy.yml | 4 ++-- 3 files changed, 25 insertions(+), 22 deletions(-) delete mode 100644 .gitea/actions/getTagSafeRef.yml create mode 100644 .gitea/actions/getTagSafeRef/action.yml diff --git a/.gitea/actions/getTagSafeRef.yml b/.gitea/actions/getTagSafeRef.yml deleted file mode 100644 index 5b77397..0000000 --- a/.gitea/actions/getTagSafeRef.yml +++ /dev/null @@ -1,20 +0,0 @@ -name: Build docker image - -outputs: - branch_name: - description: 'Branch name that can be used as docker image tag' - value: ${{ steps.build.outputs.branch_name }} - -jobs: - build_docker: - runs-on: ubuntu-latest - steps: - - name: Create tag name - run: | - BRANCH_NAME="${{ github.ref }}" - CLEAN_BRANCH=$(echo "$BRANCH_NAME" | sed 's/[^a-zA-Z0-9._-]/-/g' | tr '[:upper:]' '[:lower:]') - - - name: Set output - shell: bash - run: | - echo "branch_name=$CLEAN_BRANCH" >> $GITHUB_OUTPUT diff --git a/.gitea/actions/getTagSafeRef/action.yml b/.gitea/actions/getTagSafeRef/action.yml new file mode 100644 index 0000000..6635a07 --- /dev/null +++ b/.gitea/actions/getTagSafeRef/action.yml @@ -0,0 +1,23 @@ +name: 'Get Tag Safe Branch Name' +description: 'Get a sanitized branch name that can be used as a Docker tag' + +outputs: + branch_name: + description: 'Branch name that can be used as docker image tag' + value: ${{ steps.get-branch.outputs.branch_name }} + +runs: + using: 'composite' + steps: + - name: Create tag safe branch name + id: get-branch + shell: bash + run: | + BRANCH_NAME="${{ github.ref }}" + + # Clean the branch name for Docker tag compatibility + CLEAN_BRANCH=$(echo "$BRANCH_NAME" | sed 's/[^a-zA-Z0-9._-]/-/g' | tr '[:upper:]' '[:lower:]') + + echo "Original branch: $BRANCH_NAME" + echo "Clean branch: $CLEAN_BRANCH" + echo "branch_name=$CLEAN_BRANCH" >> $GITHUB_OUTPUT diff --git a/.gitea/workflows/commentDeploy.yml b/.gitea/workflows/commentDeploy.yml index c7d39e0..07c7c70 100644 --- a/.gitea/workflows/commentDeploy.yml +++ b/.gitea/workflows/commentDeploy.yml @@ -12,10 +12,10 @@ jobs: steps: - name: Get tag safe branch name id: branch_name - uses: .gitea/actions/getTagSafeRef.yml + uses: .gitea/actions/getTagSafeRef - name: Print branch_name - run: ${{ steps.branch_name.outputs.branch_name }} + run: echo "${{ steps.branch_name.outputs.branch_name }}" # - name: Build and push image # id: docker_build