diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 000000000..4495f8f9b --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,19 @@ +name: Build and Test API +on: + pull_request: + branches: [develop] + +jobs: + build: + name: Build with Maven + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v7 + - name: Set up JDK 17 + uses: actions/setup-java@v6 + with: + distribution: 'temurin' + java-version: 17 + cache: 'maven' + - name: Build with Maven + run: mvn -B package --file pom.xml diff --git a/.github/workflows/publish-docker-image-prod.yml b/.github/workflows/publish-docker-image-prod.yml index 941ada3de..61b21216d 100644 --- a/.github/workflows/publish-docker-image-prod.yml +++ b/.github/workflows/publish-docker-image-prod.yml @@ -11,17 +11,17 @@ jobs: runs-on: ubuntu-latest steps: - name: Check out the repo - uses: actions/checkout@v4 + uses: actions/checkout@v7 - name: Log in to Docker Hub - uses: docker/login-action@v3 + uses: docker/login-action@v4 with: username: ${{ secrets.DOCKER_USERNAME }} password: ${{ secrets.DOCKER_PASSWORD }} - name: Extract metadata (tags, labels) for Docker id: meta - uses: docker/metadata-action@v4 + uses: docker/metadata-action@v6 with: images: wiseberkeley/wise-api-server flavor: latest=true @@ -30,7 +30,7 @@ jobs: type=sha - name: Build and push Docker image - uses: docker/build-push-action@v6 + uses: docker/build-push-action@v7 with: context: . push: true diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 2d2e7a08c..569a2774a 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -2,20 +2,23 @@ # For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven name: Build API and release on GitHub -on: [push, pull_request] +on: + push: + branches: [develop] jobs: build: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 - - uses: actions/setup-node@v4 + - uses: actions/checkout@v7 + - uses: actions/setup-node@v7 with: - node-version: 20 + node-version: 26 - name: Set up JDK 17 - uses: actions/setup-java@v4 + uses: actions/setup-java@v6 with: distribution: 'temurin' java-version: 17 + cache: 'maven' - name: Build with Maven run: mvn -B package --file pom.xml - name: Release