This commit is contained in:
@@ -8,27 +8,18 @@ on:
|
|||||||
jobs:
|
jobs:
|
||||||
build-and-deploy:
|
build-and-deploy:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
container:
|
|
||||||
image: openjdk:21
|
|
||||||
options: -v /var/run/docker.sock:/var/run/docker.sock
|
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
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
|
- 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
|
- name: Build Docker image
|
||||||
run: |
|
run: docker build -t auth-backend:latest .
|
||||||
docker build -t auth-backend:latest -t auth-backend:${{ github.sha }} .
|
|
||||||
|
|
||||||
- name: Deploy
|
- name: Deploy
|
||||||
run: |
|
run: |
|
||||||
|
|||||||
Reference in New Issue
Block a user