Skip to content

chore(ci): don't build on version bump #24

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 13, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 37 additions & 5 deletions .github/workflows/push-main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,29 +8,59 @@ permissions:
contents: read

jobs:
check-bump:
name: Check bump
runs-on: ubuntu-latest
outputs:
is-bump: ${{ steps.check-bump.outputs.is-bump }}
steps:
- name: Checkout Repo
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Check Bump
id: check-bump
run: |
msg="$(git log -1 --pretty=%B)"
echo "message=$msg" >> $GITHUB_OUTPUT

if [[ "$msg" == bump:* ]]; then
echo "is-bump=true" >> $GITHUB_OUTPUT
else
echo "is-bump=false" >> $GITHUB_OUTPUT
fi

version:
name: Version
runs-on: ubuntu-latest
needs: [check-bump]
if: needs.check-bump.outputs.is-bump == 'false'
outputs:
version: ${{ steps.next-version.outputs.version }}
steps:
- name: Checkout Repo
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Setup Pyhon
uses: actions/setup-python@v5

with:
python-version: '3.13'

- name: Install Commitizen
run: ./.internal/ci/install-cz.sh

- name: Determine Next Version
id: next-version
run: echo "version=$(./.internal/ci/version-next.sh)" >> $GITHUB_OUTPUT

build-theme:
name: Build Theme
needs: [version]
needs: [check-bump, version]
if: needs.version.outputs.version != '' && needs.check-bump.outputs.is-bump == 'false'
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
Expand Down Expand Up @@ -64,7 +94,8 @@ jobs:
build-extension:
name: Build Extension
runs-on: ubuntu-latest
needs: [version]
needs: [check-bump, version]
if: needs.version.outputs.version != '' && needs.check-bump.outputs.is-bump == 'false'
outputs:
extension-artifact-name: ${{ steps.upload.outputs.artifact-name }}
steps:
Expand Down Expand Up @@ -102,7 +133,8 @@ jobs:
test-e2e:
name: Test E2E
runs-on: ubuntu-latest
needs: [build-theme, build-extension]
needs: [check-bump, version, build-theme, build-extension]
if: needs.version.outputs.version != '' && needs.check-bump.outputs.is-bump == 'false'
env:
THEME_PATH: ./keycloak-app-passwords-theme.jar
EXTENSION_PATH: ./keycloak-app-passwords-extension.jar
Expand Down Expand Up @@ -158,8 +190,8 @@ jobs:
release:
name: Release
runs-on: ubuntu-latest
needs: [version, test-e2e]
if: needs.version.outputs.version != ''
needs: [check-bump, version, test-e2e]
if: needs.version.outputs.version != '' && needs.check-bump.outputs.is-bump == 'false'
environment: release
permissions:
contents: write
Expand Down
2 changes: 1 addition & 1 deletion .internal/ci/init-openldap.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ for i in {1..30}; do
break
fi
echo "Waiting for LDAP... ($i)"
sleep 1
sleep 2
done

docker exec openldap sh -c 'cd /tmp/ldapscripts && sh add-schema.sh'
2 changes: 1 addition & 1 deletion extension/.internal/scripts/import.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ for i in {1..30}; do
break
fi
echo "Waiting for LDAP... ($i)"
sleep 1
sleep 2
done

docker compose run --rm \
Expand Down