v0.0.3 #3
Workflow file for this run
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: Build and Publish Container | |
on: | |
release: | |
types: | |
- created | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
- name: Set up JDK | |
uses: actions/setup-java@v2 | |
with: | |
java-version: '17' | |
distribution: 'adopt' | |
- name: Build with Maven | |
run: mvn clean install | |
- name: Build Docker image | |
run: docker build -t my-gateway-image . | |
- name: Log into GitHub Packages | |
run: echo "${{ secrets.PERSONAL_TOKEN }}" | docker login docker.pkg.github.com -u "${{ github.actor }}" --password-stdin | |
- name: Tag Docker image | |
run: docker tag my-gateway-image docker.pkg.github.com/narvane/my-gateway/my-gateway-image:${{ github.event.release.tag_name }} | |
- name: Push Docker image to GitHub Packages | |
run: docker push docker.pkg.github.com/narvane/my-gateway/my-gateway-image:${{ github.event.release.tag_name }} |