fix(deps): update dependency org.springdoc:springdoc-openapi-starter-… #208
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: buildAndRelease | |
on: | |
push: | |
branches: [ "main" ] | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Semantic Release | |
uses: cycjimmy/semantic-release-action@v4 | |
with: | |
branch: 'main' | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Get Semantic Release Version | |
id: get-version | |
run: | | |
branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}} | |
if [ "${branch}" == "main" ]; then | |
echo "::set-output name=version::$(grep -oP '\[\d+\.\d+\.\d+\]' CHANGELOG.md | tr -d '[]')" | |
else | |
echo "::set-output name=version::${branch}" | |
fi | |
- name: show version | |
run: | | |
echo "Semantic Release Version: ${{ steps.get-version.outputs.version }}" | |
- name: setup qemu for multi-arch build | |
uses: docker/setup-qemu-action@v3 | |
with: | |
platforms: amd64,arm64 | |
- name: setup buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Log in to Docker Hub | |
uses: docker/login-action@v3 | |
with: | |
#registry: registry.hub.docker.com | |
username: wurstbrot | |
password: ${{ secrets.HUB_TOKEN }} | |
- name: Set up Java | |
uses: actions/setup-java@v4 | |
with: | |
java-version: 17 | |
distribution: temurin | |
- name: build | |
run: | | |
branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}} | |
tag="${{ steps.get-version.outputs.version }}" | |
if [ "${branch}" == "main" ]; then | |
tag="${tag},latest" | |
fi | |
echo "tag: ${tag}, ${branch}" | |
./mvnw compile com.google.cloud.tools:jib-maven-plugin:3.2.0:build -Djib.from.image=eclipse-temurin:17-jre -Djib.container.environment=XDG_CONFIG_HOME=/tmp -Dimage=docker.io/wurstbrot/metric-analyzer -Djib.to.tags=${tag} | |
# Commit all changed files back to the repository | |
- uses: planetscale/ghcommit-action@v0.2.0 | |
with: | |
commit_message: "🤖 BOT based relase commit" | |
repo: ${{ github.repository }} | |
branch: 'main' | |
env: | |
GITHUB_TOKEN: ${{secrets.ACCESS_TOKEN}} | |
heroku: | |
if: github.repository == 'devsecopsmaturitymodel/metricAnalyzer' && github.event_name == 'push' && github.ref == 'refs/heads/main' | |
runs-on: ubuntu-latest | |
steps: | |
- name: "Check out Git repository" | |
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
- name: "Set Heroku app & branch for ${{ github.ref }}" | |
run: | | |
echo "HEROKU_BRANCH=main" >> $GITHUB_ENV | |
- name: "Deploy ${{ github.ref }} to Heroku" | |
uses: akhileshns/heroku-deploy@581dd286c962b6972d427fcf8980f60755c15520 # v3.13.15 | |
with: | |
heroku_api_key: ${{ secrets.HEROKU_API_KEY }} | |
heroku_app_name: "metric-analyzer" | |
heroku_email: timo.pagel@owasp.org | |
branch: ${{ env.HEROKU_BRANCH }} |