work on gh actions for docker image #15
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: Docker Image CI | |
on: | |
push: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Set up JDK | |
uses: actions/setup-java@v1 | |
with: | |
java-version: 1.17 | |
- name: Checkout project sources | |
uses: actions/checkout@v3 | |
- name: Setup Gradle | |
uses: gradle/gradle-build-action@v2 | |
- name: Run build with Gradle Wrapper | |
run: ./gradlew build | |
- name: Build with Gradle | |
run: ./gradlew jar | |
- name: Copy jar file | |
run: cp build/libs/*.jar Docker | |
- name: 'Login to GitHub Container Registry' | |
uses: docker/login-action@v1 | |
with: | |
registry: ghcr.io | |
username: ${{github.actor}} | |
password: ${{secrets.GITHUB_TOKEN}} | |
- name: 'Build Inventory Image' | |
run: | | |
ls Docker/ | |
docker build . --tag ghcr.io/maggiwuerze/xdccwebloader:latest -f Docker/Dockerfile | |
docker push ghcr.io/maggiwuerze/xdccwebloader:latest |