feat(docs): adding content-type warning on external claim provider re… #1559
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Main | |
on: | |
push: | |
branches: | |
- master | |
- dev | |
tags: | |
- '*' | |
pull_request: | |
branches: | |
- master | |
- dev | |
jobs: | |
check: | |
name: Check | |
runs-on: ubuntu-latest | |
env: | |
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} | |
strategy: | |
matrix: | |
java: ['11'] | |
steps: | |
- uses: actions/checkout@v2 | |
# Caches | |
- name: Gradle cache | |
uses: actions/cache@v1 | |
with: | |
path: ~/.gradle/caches | |
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }} | |
restore-keys: | | |
${{ runner.os }}-gradle- | |
- name: Gradle wrapper cache | |
uses: actions/cache@v1 | |
with: | |
path: ~/.gradle/wrapper | |
key: ${{ runner.os }}-wrapper-${{ hashFiles('**/*.gradle') }} | |
restore-keys: | | |
${{ runner.os }}-wrapper- | |
- name: Npm cache | |
uses: actions/cache@v1 | |
with: | |
path: ~/.npm | |
key: ${{ runner.os }}-npm-${{ hashFiles('**/package-lock.json') }} | |
restore-keys: | | |
${{ runner.os }}-node- | |
- name: Node cache | |
uses: actions/cache@v1 | |
with: | |
path: node | |
key: ${{ runner.os }}-node-${{ hashFiles('**/*.gradle') }} | |
restore-keys: | | |
${{ runner.os }}-node- | |
# JDK | |
- name: Set up JDK | |
uses: actions/setup-java@v1 | |
with: | |
java-version: ${{ matrix.java }} | |
# Gradle check | |
- name: Build with Gradle | |
run: | | |
./gradlew classes testClasses --parallel --no-daemon | |
./gradlew check --no-daemon | |
# Shadow Jar, Tar and Zip | |
- name: Build jars and distribution archives | |
if: success() && matrix.java == '11' | |
run: ./gradlew shadowJar distTar distZip --no-daemon | |
# Upload artifacts | |
- name: Copy jar to docker | |
run: | | |
cp build/libs/*-all.jar docker/app/akhq.jar | |
cp build/distributions/akhq-*.tar build/distributions/akhq.tar | |
cp build/distributions/akhq-*.zip build/distributions/akhq.zip | |
- name: Upload jar | |
uses: actions/upload-artifact@v1 | |
if: success() && matrix.java == '11' | |
with: | |
name: jar | |
path: build/libs/ | |
# Release | |
- name: Changelog | |
id: changelog | |
uses: scottbrenner/generate-changelog-action@master | |
if: startsWith(github.ref, 'refs/tags/') | |
env: | |
REPO: ${{ github.repository }} | |
with: | |
package-dir: 'client/package.json' | |
# GitHub Release | |
- name: Create GitHub release | |
uses: "marvinpinto/action-automatic-releases@latest" | |
if: startsWith(github.ref, 'refs/tags/') | |
with: | |
repo_token: "${{ secrets.GITHUB_TOKEN }}" | |
prerelease: false | |
files: | | |
build/libs/*-all.jar | |
build/distributions/akhq-*.tar | |
build/distributions/akhq-*.zip | |
# Docker | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v1 | |
if: github.ref == 'refs/heads/dev' || startsWith(github.ref, 'refs/tags/') | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v1 | |
if: github.ref == 'refs/heads/dev' || startsWith(github.ref, 'refs/tags/') | |
- name: Login to DockerHub | |
uses: docker/login-action@v1 | |
if: github.ref == 'refs/heads/dev' || startsWith(github.ref, 'refs/tags/') | |
with: | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_PASSWORD }} | |
- name: Login to GHCR | |
uses: docker/login-action@v1 | |
if: github.ref == 'refs/heads/dev' || startsWith(github.ref, 'refs/tags/') | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Extract metadata for Docker | |
id: meta | |
uses: docker/metadata-action@v3 | |
if: github.ref == 'refs/heads/dev' || startsWith(github.ref, 'refs/tags/') | |
with: | |
images: | | |
tchiotludo/akhq | |
ghcr.io/${{ github.repository }} | |
- name: Publish to registries | |
uses: docker/build-push-action@v2 | |
if: github.ref == 'refs/heads/dev' || startsWith(github.ref, 'refs/tags/') | |
with: | |
push: true | |
context: . | |
tags: ${{ steps.meta.outputs.tags }} | |
labels: ${{ steps.meta.outputs.labels }} | |
platforms: linux/amd64,linux/arm64 | |
# Slack | |
- name: Slack notification | |
uses: 8398a7/action-slack@v2 | |
if: ${{ always() && env.SLACK_WEBHOOK_URL != 0 }} | |
with: | |
status: ${{ job.status }} | |
username: Github Actions | |
icon_emoji: ':github-actions:' | |
channel: 'C03H9CEBGS2' | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} | |