This commit is contained in:
@@ -8,27 +8,18 @@ on:
|
||||
jobs:
|
||||
build-and-deploy:
|
||||
runs-on: ubuntu-latest
|
||||
container:
|
||||
image: openjdk:21
|
||||
options: -v /var/run/docker.sock:/var/run/docker.sock
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Setup Maven cache
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: ~/.m2/repository
|
||||
key: maven-${{ hashFiles('pom.xml') }}
|
||||
restore-keys: maven-
|
||||
|
||||
- name: Build with Maven
|
||||
run: mvn clean install -Dmaven.test.skip=true
|
||||
run: |
|
||||
apt-get update -qq && apt-get install -y -qq maven 2>/dev/null || true
|
||||
mvn clean install -Dmaven.test.skip=true
|
||||
|
||||
- name: Build Docker image
|
||||
run: |
|
||||
docker build -t auth-backend:latest -t auth-backend:${{ github.sha }} .
|
||||
run: docker build -t auth-backend:latest .
|
||||
|
||||
- name: Deploy
|
||||
run: |
|
||||
|
||||
Reference in New Issue
Block a user