From 5e4fdd2275fd8092beaea6acb09c62275178e787 Mon Sep 17 00:00:00 2001 From: Tyler Marr <41449746+marrts@users.noreply.github.com> Date: Mon, 8 Apr 2024 09:41:12 -0500 Subject: [PATCH] Fix main branch to point to master (#104) --- .github/workflows/clang_format.yml | 4 ++++ .github/workflows/docker.yml | 10 +++++++++- .github/workflows/ubuntu.yml | 3 +++ .github/workflows/unstable.yml | 3 +++ 4 files changed, 19 insertions(+), 1 deletion(-) diff --git a/.github/workflows/clang_format.yml b/.github/workflows/clang_format.yml index 3e5fd97d..34450833 100644 --- a/.github/workflows/clang_format.yml +++ b/.github/workflows/clang_format.yml @@ -5,6 +5,10 @@ on: branches: - main pull_request: + paths: + - 'tesseract**' + - '.github/workflows/clang_format.yml' + - '**clang-format' # allow manually starting this workflow workflow_dispatch: diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 347c51fb..d2e19e09 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -37,6 +37,14 @@ jobs: registry: ${{ env.REGISTRY }} username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} + + - name: Adjust branch name for Docker tag + run: | + if [[ "${{ github.ref }}" == "refs/heads/main" ]]; then + echo "BRANCH_NAME=master" >> $GITHUB_ENV + else + echo "BRANCH_NAME=${GITHUB_REF#refs/heads/}" >> $GITHUB_ENV + fi - name: Extract Docker meta-information id: meta @@ -48,7 +56,7 @@ jobs: prefix= suffix= tags: | - type=ref,event=branch,prefix=${{ matrix.distro }}- + type=ref,event=branch,prefix=${{ matrix.distro }}-,value=${{ env.BRANCH_NAME }} type=raw,event=pr,prefix=${{ matrix.distro }}-,value=master type=semver,pattern={{major}}.{{minor}},prefix=${{ matrix.distro }}- diff --git a/.github/workflows/ubuntu.yml b/.github/workflows/ubuntu.yml index ace2f347..7ca9beba 100644 --- a/.github/workflows/ubuntu.yml +++ b/.github/workflows/ubuntu.yml @@ -5,6 +5,9 @@ on: branches: - main pull_request: + paths: + - 'tesseract**' + - '.github/workflows/ubuntu.yml' schedule: - cron: '0 5 * * *' release: diff --git a/.github/workflows/unstable.yml b/.github/workflows/unstable.yml index d5cd3b1a..a0077d66 100644 --- a/.github/workflows/unstable.yml +++ b/.github/workflows/unstable.yml @@ -5,6 +5,9 @@ on: branches: - main pull_request: + paths: + - 'tesseract**' + - '.github/workflows/unstable.yml' schedule: - cron: '0 5 * * *' release: