Skip to content

Open source AI coding agent. Designed for large projects and real world tasks.

Updated docker-publish.yml

Johannes Goebel0dced7d0e74e
diff --git a/.github/workflows/docker-publish.yml b/.github/workflows/docker-publish.yml
index e89df5b3..f806b088 100644
--- a/.github/workflows/docker-publish.yml
+++ b/.github/workflows/docker-publish.yml
@@ -9,37 +9,42 @@ jobs:
runs-on: ubuntu-latest
steps:
+ - name: Check if the release tag starts with 'server'
+ id: check_tag
+ run: |
+ if [[ ! "${GITHUB_REF_NAME}" =~ ^server ]]; then
+ echo "::set-output name=skip::true"
+ else
+ echo "::set-output name=skip::false"
+ fi
+ shell: bash
+
+ - name: Skip build if tag does not start with 'server'
+ if: steps.check_tag.outputs.skip == 'true'
+ run: echo "Skipping build because the tag does not start with 'server'."
+
- name: Check out the repo
+ if: steps.check_tag.outputs.skip == 'false'
uses: actions/checkout@v2
- name: Set up Docker Buildx
+ if: steps.check_tag.outputs.skip == 'false'
uses: docker/setup-buildx-action@v1
- name: Log in to GitHub Container Registry
+ if: steps.check_tag.outputs.skip == 'false'
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
+
- name: Sanitize ref name
id: sanitize
+ if: steps.check_tag.outputs.skip == 'false'
run: echo "SANITIZED_REF_NAME=${GITHUB_REF_NAME//\//-}" >> $GITHUB_ENV
- - name: Check if the release tag starts with 'server'
- id: check_tag
- run: |
- if [[ ! "${GITHUB_REF_NAME}" =~ ^server ]]; then
- echo "::set-output name=skip::true"
- else
- echo "::set-output name=skip::false"
- fi
- shell: bash
-
- - name: Skip build if tag does not start with 'server'
- if: steps.check_tag.outputs.skip == 'true'
- run: echo "Skipping build because the tag does not start with 'server'."
-
- name: Build and push
if: steps.check_tag.outputs.skip == 'false'
uses: docker/build-push-action@v2