nomad 디플로이 테스트 12 #12
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Anissia Core Nomad Deploy | |
on: | |
push: | |
branches: | |
- master | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Set up JDK | |
uses: actions/setup-java@v4 | |
with: | |
distribution: 'temurin' | |
java-version: '21' | |
- name: Build and package Spring Boot application with Gradle | |
run: | | |
./gradlew clean build | |
- name: Setup `nomad-pack` | |
uses: hashicorp/setup-nomad-pack@main | |
id: setup | |
- name: Run `nomad-pack info` for `.` | |
id: info | |
run: "nomad-pack render ." | |
- name: Run `nomad-pack run` for `.` | |
id: run | |
run: "nomad-pack run ." | |
env: | |
NOMAD_ADDR: "${{ secrets.NOMAD_ADDR }}" | |
NOMAD_TOKEN: "${{ secrets.NOMAD_TOKEN }}" | |
continue-on-error: true | |
# | |
# - name: Setup `nomad` | |
# uses: hashicorp/setup-nomad@main | |
# id: setup | |
# | |
# - name: Deploy to Nomad | |
# env: | |
# NOMAD_ADDR: ${{ secrets.NOMAD_ADDR }} | |
# NOMAD_TOKEN: ${{ secrets.NOMAD_TOKEN }} | |
# run: | | |
# nomad job run anissia-core.nomad |