Publish #1605
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: 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 |