| 12345678910111213141516171819202122232425262728293031 |
- name: Release
- on:
- push:
- branches: [ main ]
- jobs:
- build:
- runs-on: ubuntu-latest
- steps:
- - uses: actions/checkout@v3
- - name: Set up JDK 17
- uses: actions/setup-java@v3
- with:
- java-version: '17'
- distribution: 'adopt'
- - name: Build jar
- run: chmod +x ./gradlew && ./gradlew clean build
- - name: Run tests
- run: ./gradlew test
- - name: Build the Docker image
- run: docker build -t dbohry/auth-service .
- - name: Login to Docker Hub
- uses: docker/login-action@v2
- with:
- username: ${{ secrets.DOCKERHUB_USERNAME }}
- password: ${{ secrets.DOCKERHUB_TOKEN }}
- - name: Push image
- run: docker push dbohry/auth-service
|