Skip to content

Commit

Permalink
Merge pull request #104 from mjanez/ckan-2.11
Browse files Browse the repository at this point in the history
Only in PR 2.9 and 2.10
  • Loading branch information
mjanez committed Aug 26, 2024
2 parents 4c07dd5 + 88662de commit 0867c70
Showing 1 changed file with 6 additions and 24 deletions.
30 changes: 6 additions & 24 deletions .github/workflows/docker-build.py.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ on:
types:
- closed
branches:
- master
- 'ckan-*.*'
- 'ckan-2.9'
- 'ckan-2.10'
- '!ckan-main'
- '!dev/ckan-*.*.*'
- '!feature/*'
Expand Down Expand Up @@ -50,7 +50,7 @@ jobs:
BRANCH_VERSION=$(echo "${{ env.BRANCH }}" | sed 's/ckan-//')
if [[ $(echo "$BRANCH_VERSION >= 2.11" | bc -l) -eq 1 ]]; then
echo "No Dockerfile.py3.* found for branch version >= 2.11. Exiting successfully."
echo "exit_early=true" >> $GITHUB_ENV
exit 0
else
echo "No Dockerfile.py3.* found. Exiting."
exit 1
Expand All @@ -60,14 +60,6 @@ jobs:
echo "DOCKERFILE=${{ env.DOCKERFILE }}" >> $GITHUB_ENV
fi
- name: Check if should exit early
id: check_exit_early
run: |
if [[ "${{ env.exit_early }}" == "true" ]]; then
echo "Exiting early."
exit 0
fi
- name: Extract CKAN_VERSION from base Dockerfile
id: extract_version
run: |
Expand Down Expand Up @@ -136,7 +128,6 @@ jobs:
name: Build and push development image from base
runs-on: ubuntu-latest
needs: build_and_push_base
if: needs.build_and_push_base.outputs.exit_early != 'true'
env:
CKAN_VERSION: ${{ needs.build_and_push_base.outputs.ckan_version }}
DOCKER_LABELS: ${{ needs.build_and_push_base.outputs.docker_labels }}
Expand All @@ -157,7 +148,7 @@ jobs:
BRANCH_VERSION=$(echo "${{ env.BRANCH }}" | sed 's/ckan-//')
if [[ $(echo "$BRANCH_VERSION >= 2.11" | bc -l) -eq 1 ]]; then
echo "No Dockerfile.py3.* found for branch version >= 2.11. Exiting successfully."
echo "exit_early=true" >> $GITHUB_ENV
exit 0
else
echo "No Dockerfile.py3.* found. Exiting."
exit 1
Expand All @@ -167,14 +158,6 @@ jobs:
echo "DOCKERFILE=${{ env.DOCKERFILE }}" >> $GITHUB_ENV
fi
- name: Check if should exit early
id: check_exit_early
run: |
if [[ "${{ env.exit_early }}" == "true" ]]; then
echo "Exiting early."
exit 0
fi
- name: Generate suffix tag
id: generate_suffix
run: |
Expand Down Expand Up @@ -212,7 +195,6 @@ jobs:
name: Build and push test image from dev
runs-on: ubuntu-latest
needs: [build_and_push_base, build_and_push_dev]
if: needs.build_and_push_base.outputs.exit_early != 'true' && needs.build_and_push_dev.outputs.exit_early != 'true'
env:
CKAN_VERSION: ${{ needs.build_and_push_base.outputs.ckan_version }}
DOCKER_LABELS: ${{ needs.build_and_push_base.outputs.docker_labels }}
Expand Down Expand Up @@ -244,5 +226,5 @@ jobs:
uses: hadolint/hadolint-action@v3.1.0
with:
# Test only use base Dockerfile
dockerfile: ${{ env.CONTEXT }}/${{ env.BRANCH }}/test/Dockerfile }}
no-fail: true
dockerfile: ${{ env.CONTEXT }}/${{ env.BRANCH }}/test/Dockerfile
no-fail: true

0 comments on commit 0867c70

Please sign in to comment.