Skip to content

armgit / core

Public Imported from GitHub
0

100% open-source IoT Platform - Integrate your devices, add intelligence, build custom apps

Fix keyclock pipeline for v12

Michal Rutka921ae2025f15
diff --git a/.github/workflows/keycloak-multi.yml b/.github/workflows/keycloak-multi.yml
deleted file mode 100644
index 0a51707f8..000000000
--- a/.github/workflows/keycloak-multi.yml
+++ /dev/null
@@ -1,38 +0,0 @@
-name: keycloak-multi
-
-# Controls when the action will run.
-on:
- # Triggers the workflow on push or pull request events but only for the master branch
- push:
- branches: [ master ]
- paths:
- - keycloak/**
-
- # Allows you to run this workflow manually from the Actions tab
- workflow_dispatch:
-
-env:
- PLATFORM: linux/amd64,linux/arm64
-
-jobs:
- image_keycloak:
- runs-on: ubuntu-latest
- steps:
- - uses: actions/checkout@v2
- - name: set up QEMU
- uses: docker/setup-qemu-action@v1
- with:
- platforms: all
- - name: install buildx
- id: buildx
- uses: docker/setup-buildx-action@v1
- with:
- version: latest
- install: true
- - name: available platforms
- run: echo ${{ steps.buildx.outputs.platforms }}
- - name: login to docker hub
- run: echo "${{ secrets.DOCKERHUB_PASSWORD }}" | docker login -u "${{ secrets.DOCKERHUB_USER }}" --password-stdin
- - name: build and push images
- run: |
- docker build --push --platform linux/amd64,linux/arm64 -t openremote/keycloak:multi -f keycloak/multi.Dockerfile keycloak
diff --git a/.github/workflows/keycloak.yml b/.github/workflows/keycloak.yml
index 17617334a..7b7716801 100644
--- a/.github/workflows/keycloak.yml
+++ b/.github/workflows/keycloak.yml
@@ -7,16 +7,43 @@ on:
branches: [ master ]
paths:
- keycloak/**
+ - .github/workflows/keycloak.yml
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
env:
- PLATFORM: linux/amd64
+ PLATFORM: linux/amd64,linux/arm64
jobs:
+ build:
+ runs-on: ubuntu-latest
+
+ steps:
+ - uses: actions/checkout@v2
+ - uses: n1hility/cancel-previous-runs@v2
+ with:
+ token: ${{ secrets.GITHUB_TOKEN }}
+ - name: set up JDK 1.8
+ uses: actions/setup-java@v1
+ with:
+ java-version: 1.8
+ - name: grant execute permission for gradlew
+ run: chmod +x gradlew
+ - name: build with Gradle
+ run: ./gradlew clean installDist
+ - name: Share build artifacts
+ uses: actions/upload-artifact@v2
+ with:
+ name: keycloak-build
+ path: |
+ keycloak/build
+ retention-days: 1
+
image_keycloak:
runs-on: ubuntu-latest
+ needs: [build]
+
steps:
- uses: actions/checkout@v2
- name: set up QEMU
@@ -33,6 +60,10 @@ jobs:
run: echo ${{ steps.buildx.outputs.platforms }}
- name: login to docker hub
run: echo "${{ secrets.DOCKERHUB_PASSWORD }}" | docker login -u "${{ secrets.DOCKERHUB_USER }}" --password-stdin
+ - name: Download build artifacts
+ uses: actions/download-artifact@v2
+ with:
+ name: keycloak-build
- name: build and push images
run: |
docker build --push --platform $PLATFORM -t openremote/keycloak:latest keycloak