Skip to content

Commit

Permalink
ci: test
Browse files Browse the repository at this point in the history
  • Loading branch information
Queue-ri committed Nov 19, 2023
1 parent 5fecb61 commit dba1c80
Showing 1 changed file with 55 additions and 0 deletions.
55 changes: 55 additions & 0 deletions .github/workflows/build-n-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: Build and Publish

on:
push:
branches: [ develop ]

jobs:
gradle-build:
name: Gradle build
runs-on: ubuntu-latest
env:
working-directory: ./backend
steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'

- name: Grant execute permission to gradlew
run: chmod +x ./gradlew
working-directory: ${{ env.working-directory }}

- name: Build with Gradle
run: ./gradlew bootJar
working-directory: ${{ env.working-directory }}

- name: Temporarily save build artifact
uses: actions/upload-artifact@v2
with:
name: gradle-build
path: backend/build/libs/*.jar
retention-days: 1

publish-gcr:
runs-on: ubuntu-latest
needs: gradle-build

steps:
- uses: actions/checkout@v2

- name: Get gradle built artifact
uses: actions/download-artifact@v2
with:
name: gradle-build
path: backend/build/libs

- name: Docker Build and Publish latest image
uses: VaultVulp/[email protected]
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
image-name: pupmory-backend # tag will be automatically set to latest

0 comments on commit dba1c80

Please sign in to comment.