Simplify Gitea Actions workflow
Build and Deploy / build-and-deploy (push) Waiting to run

This commit is contained in:
2026-06-01 16:58:03 +08:00
parent 2e1e22f573
commit d0c37ea7fb
+4 -13
View File
@@ -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: |