Publish Maven Package to GitHub Packages #5
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 Maven Package to GitHub Packages | |
on: | |
workflow_run: | |
workflows: ["Generate Java Fabric8 Model From CRD"] | |
types: | |
- completed | |
jobs: | |
publish: | |
if: ${{ github.event.workflow_run.conclusion == 'success' }} | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
packages: write | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
ref: '${{ github.event.workflow_run.head_branch }}' | |
- uses: actions/setup-java@v3 | |
with: | |
java-version: '11' | |
distribution: 'adopt' | |
- name: Publish package | |
run: mvn --batch-mode deploy | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |