Skip to content

Publish UDS Package Sonarqube #56

Publish UDS Package Sonarqube

Publish UDS Package Sonarqube #56

name: Publish UDS Package Sonarqube
on:
push:
branches:
- main
jobs:
tag-new-version:
name: Tag New Version
permissions: write-all
runs-on: ubuntu-latest
outputs:
release_created: ${{ steps.release-flag.outputs.release_created }}
steps:
- name: Create release tag
id: tag
uses: google-github-actions/release-please-action@e4dc86ba9405554aeba3c6bb2d169500e7d3b4ee # v4.1.1
- id: release-flag
run: echo "release_created=${{ steps.tag.outputs.release_created || false }}" >> $GITHUB_OUTPUT
publish-package:
needs: tag-new-version
if: ${{ needs.tag-new-version.outputs.release_created == 'true' }}
runs-on: ubuntu-latest
strategy:
matrix:
flavor: [upstream, registry1]
name: Publish ${{ matrix.flavor }}
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
- name: Environment setup
uses: defenseunicorns/uds-common/.github/actions/setup@11e591f2ec7d158923d973c85097ce28a5f55db4 # v0.4.5
with:
registry1Username: ${{ secrets.IRON_BANK_ROBOT_USERNAME }}
registry1Password: ${{ secrets.IRON_BANK_ROBOT_PASSWORD }}
ghToken: ${{ secrets.GITHUB_TOKEN }}
- name: Publish Package
run: uds run -f tasks/publish.yaml package --set FLAVOR=${{ matrix.flavor }}
- name: Save logs
if: always()
uses: defenseunicorns/uds-common/.github/actions/save-logs@11e591f2ec7d158923d973c85097ce28a5f55db4 # v0.4.5
with:
suffix: ${{ matrix.flavor }}-${{ github.run_id }}-${{ github.run_attempt }}