[add] distributionManagement #6
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: SinkPackage | |
on: | |
push: | |
branches: | |
- main | |
tags: | |
- '*' | |
env: | |
REGISTRY: ghcr.io | |
IMAGE_NAME: tuancamtbtx/airflow | |
jobs: | |
build-and-push-package: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
packages: write | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up JDK 11 | |
uses: actions/setup-java@v3 | |
with: | |
java-version: '11' | |
distribution: 'temurin' | |
server-id: github # Value of the distributionManagement/repository/id field of the pom.xml | |
settings-path: ${{ github.workspace }} # location for the settings.xml file | |
- name: Set up Maven | |
id: setup | |
uses: stCarolas/setup-maven@v4.5 | |
with: | |
maven-version: 3.8.2 | |
- name: Build with Maven | |
id: build_maven | |
run: mvn -B package --file pom.xml | |
- name: Publish package | |
id: publish_package | |
run: mvn --batch-mode deploy | |
env: | |
GITHUB_TOKEN: ${{ secrets.REGISTRY_GITHUB_TOKEN }} | |