fix(deps): update dependency mermaid to v11.2.0 (#603) #71
Workflow file for this run
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: release | |
on: | |
push: | |
tags: | |
- '*' | |
env: | |
IMAGE_NAME: ${{ github.event.repository.name }} | |
jobs: | |
build-gradle: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-java@v4 | |
with: | |
distribution: temurin | |
java-version: 21 | |
- name: Setup Gradle | |
uses: gradle/[email protected] | |
- name: Execute Gradle build | |
run: ./gradlew -PprojectVersion=${{ github.ref_name }} test assemble installDist | |
- name: Archive binaries | |
uses: actions/upload-artifact@v4 | |
with: | |
name: binaries | |
path: build/install | |
retention-days: 1 | |
- name: Archive distribution | |
uses: actions/upload-artifact@v4 | |
with: | |
name: distribution | |
path: build/distributions | |
retention-days: 1 | |
build-push-docker: | |
runs-on: ubuntu-latest | |
needs: build-gradle | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Login to GitHub Container Registry | |
uses: docker/login-action@v3 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Set up Docker Buildx | |
id: buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Set up cosign | |
uses: sigstore/cosign-installer@main | |
- name: Download binaries | |
uses: actions/download-artifact@v4 | |
with: | |
name: binaries | |
path: build/install | |
- name: Download distribution | |
uses: actions/download-artifact@v4 | |
with: | |
name: distribution | |
path: build/distributions | |
- name: Build and publish container image | |
uses: docker/build-push-action@v6 | |
id: build_push | |
with: | |
push: true | |
builder: ${{ steps.buildx.outputs.name }} | |
context: . | |
file: ./Dockerfile | |
platforms: linux/amd64,linux/arm64/v8 | |
tags: | | |
ghcr.io/avisi-cloud/${{ env.IMAGE_NAME }}:${{ github.ref_name }} | |
ghcr.io/avisi-cloud/${{ env.IMAGE_NAME }}:latest | |
labels: | | |
org.opencontainers.image.title=${{ github.event.repository.name }} | |
org.opencontainers.image.description=${{ github.event.repository.description }} | |
org.opencontainers.image.url=${{ github.event.repository.html_url }} | |
org.opencontainers.image.source=${{ github.event.repository.html_url }} | |
org.opencontainers.image.revision=${{ github.sha }} | |
org.opencontainers.image.version=${{ github.ref_name }} | |
- name: sign container image | |
run: | | |
cosign sign --yes --key env://COSIGN_KEY ghcr.io/avisi-cloud/${{ env.IMAGE_NAME }}:${{ github.ref_name }}@${{ steps.build_push.outputs.digest }} | |
shell: bash | |
env: | |
COSIGN_KEY: ${{secrets.COSIGN_KEY}} | |
COSIGN_PASSWORD: ${{secrets.COSIGN_PASSWORD}} | |
- name: Check images | |
run: | | |
docker buildx imagetools inspect ghcr.io/avisi-cloud/${IMAGE_NAME}:${{ github.ref_name }} | |
docker pull ghcr.io/avisi-cloud/${IMAGE_NAME}:${{ github.ref_name }} | |
cosign verify --key cosign.pub ghcr.io/avisi-cloud/${IMAGE_NAME}:${{ github.ref_name }} | |
- uses: anchore/sbom-action@v0 | |
with: | |
image: ghcr.io/avisi-cloud/${{ env.IMAGE_NAME }}:${{ github.ref_name }} | |
create-draft-release: | |
runs-on: ubuntu-latest | |
needs: build-gradle | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Download distribution | |
uses: actions/download-artifact@v4 | |
with: | |
name: distribution | |
path: build/distributions | |
- name: Create Release Draft | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: | | |
gh release create ${{ github.ref_name }} \ | |
--draft \ | |
--title "${{ github.ref_name }}" | |
- name: Upload Release Assets | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: gh release upload ${{ github.ref_name }} ./build/distributions/* | |
generate-example-site: | |
runs-on: ubuntu-latest | |
needs: build-gradle | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- uses: actions/setup-java@v4 | |
with: | |
distribution: temurin | |
java-version: 21 | |
- name: Download binaries | |
uses: actions/download-artifact@v4 | |
with: | |
name: binaries | |
path: build/install | |
- name: Set up environment | |
run: | | |
sudo apt-get install -y graphviz | |
chmod +x build/install/structurizr-site-generatr/bin/structurizr-site-generatr | |
- name: Generate example site | |
run: > | |
build/install/structurizr-site-generatr/bin/structurizr-site-generatr generate-site | |
--git-url https://github.com/avisi-cloud/structurizr-site-generatr.git | |
--workspace-file docs/example/workspace.dsl | |
--assets-dir docs/example/assets | |
--branches main | |
--default-branch main | |
--version ${{ github.ref_name }} | |
- name: Upload example site as GitHub Pages artifact | |
uses: actions/upload-pages-artifact@v3 | |
with: | |
path: ./build/site | |
publish-example-site: | |
runs-on: ubuntu-latest | |
needs: generate-example-site | |
permissions: | |
pages: write | |
id-token: write | |
environment: | |
name: github-pages | |
url: ${{ steps.deployment.outputs.page_url }} | |
steps: | |
- name: Deploy example site to GitHub Pages | |
id: deployment | |
uses: actions/deploy-pages@v4 |