[ADD] 엑세스 토큰 유효시간 1시간 -> 10분 #470
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
# This workflow uses actions that are not certified by GitHub. | |
# They are provided by a third-party and are governed by | |
# separate terms of service, privacy policy, and support | |
# documentation. | |
# This workflow will build a Java project with Gradle and cache/restore any dependencies to improve the workflow execution time | |
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-java-with-gradle | |
name: Java CI with Gradle | |
on: | |
push: | |
branches: [ "main" ] | |
pull_request: | |
branches: [ "main" ] | |
permissions: | |
contents: read | |
issues: write | |
checks: write | |
pull-requests: write | |
actions: write | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up JDK 17 | |
uses: actions/setup-java@v3 | |
with: | |
java-version: '17' | |
distribution: 'temurin' | |
- uses: actions/checkout@v3 | |
- name: make application.yml | |
run: | | |
# create application.yml | |
cd ./src/main/resources | |
# application.yml 파일 생성 | |
touch ./application.yml | |
# GitHub-Actions 에서 설정한 값을 application.yml 파일에 쓰기 | |
echo "${{ secrets.APPLICATION }}" >> ./application.yml | |
shell: bash | |
- name: Build with Gradle | |
run: | | |
./gradlew build | |
- name: Save test result | |
uses: EnricoMi/publish-unit-test-result-action@v1 | |
if: always() | |
with: | |
files: '**/build/test-results/test/TEST-*.xml' | |
token: ${{ secrets.TOKEN_GITHUB }} | |
- name: Saves check comment when test fails | |
uses: mikepenz/action-junit-report@v3 | |
if: always() | |
with: | |
report_paths: '**/build/test-results/test/TEST-*.xml' | |
token: ${{ github.token }} | |
- name: web docker build and push | |
run: | | |
docker login -u ${{ secrets.DOCKER_USERNAME }} -p ${{ secrets.DOCKER_PASSWORD }} | |
docker build -t ${{ secrets.DOCKER_REPO }}/uliga_backend . | |
docker push ${{ secrets.DOCKER_REPO }}/uliga_backend | |
- name: executing remote ssh commands using password | |
uses: appleboy/ssh-action@v0.1.7 | |
with: | |
host: ${{ secrets.HOST }} | |
username: ubuntu | |
key: ${{ secrets.PEM_KEY }} | |
port: 22 | |
script: | | |
sudo docker pull ${{ secrets.DOCKER_REPO }}/uliga_backend | |
bash deploy.sh |