Skip to content

Publish

Publish #1605

Workflow file for this run

name: Publish
on:
schedule:
- cron: "0 3 * * *"
push:
branches:
- main
jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: 'adopt'
java-version: '17'
- run: |
sudo apt-get -y install graphviz
./gradlew build
- name: Push to workspace
env:
STRUCTURIZR_API_KEY: ${{ secrets.STRUCTURIZR_API_KEY }}
STRUCTURIZR_API_SECRET: ${{ secrets.STRUCTURIZR_API_SECRET }}
run: .github/workflows/set_version ./gradlew run --args='--push --backstage'
- uses: actions/checkout@v4
with:
ref: backstage-export
path: backstage
- name: Publish backstage catalog
run: |
cp ./exports/backstage-*.yaml backstage/exports/
cd backstage
git config --global user.name "${{ github.actor }} <${{ github.actor }}@users.noreply.github.com>"
git config --global user.email "<${{ github.actor }}@users.noreply.github.com>"
git add exports/backstage-*.yaml
git commit -m "backstage catalog export at $(date)" --allow-empty
git push