From a91287f949ea091487b7902ccd2bb706cc2b5e27 Mon Sep 17 00:00:00 2001 From: SoohoLee Date: Wed, 14 Jun 2023 16:58:23 +0900 Subject: [PATCH] Delete work-1.yml --- .github/workflows/work-1.yml | 104 ----------------------------------- 1 file changed, 104 deletions(-) delete mode 100644 .github/workflows/work-1.yml diff --git a/.github/workflows/work-1.yml b/.github/workflows/work-1.yml deleted file mode 100644 index 0d14fc4a..00000000 --- a/.github/workflows/work-1.yml +++ /dev/null @@ -1,104 +0,0 @@ -name: 'work-1' -on: - push: - paths: - - '.github/workflows/**' - - 'src/**' - - 'build.gradle' - - 'Dockerfile' - - 'readme.md' - branches: - - 'main' -jobs: - build: - name: 빌드 - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - name: application-secret.yml 생성 - env: - ACTIONS_STEP_DEBUG: true - APPLICATION_SECRET: ${{ secrets.APPLICATION_SECRET_YML }} - run: echo "$APPLICATION_SECRET" > src/main/resources/application-secret.yml - - name: jdk 17 설치 - uses: actions/setup-java@v3 - with: - java-version: '17' - distribution: 'temurin' - cache: 'gradle' - - name: gradlew 실행 권한 부여 - run: chmod +x gradlew - - name: gradle 테스트 - run: ./gradlew test --no-daemon - - name: gradle 빌드 - run: ./gradlew build -x test --no-daemon - - name: build 폴더를 캐시에 저장 - uses: actions/upload-artifact@v3 - with: - name: build-artifact - path: build - retention-days: 1 - tag: - name: 태그 생성 - needs: build - runs-on: ubuntu-latest - outputs: - tag_name: ${{ steps.tag_version.outputs.new_tag }} - steps: - - uses: actions/checkout@v3 - - uses: mathieudutour/github-tag-action@v6.1 - id: tag_version - with: - github_token: ${{ secrets.GITHUB_TOKEN }} - - uses: actions/create-release@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - tag_name: ${{ steps.tag_version.outputs.new_tag }} - release_name: Release ${{ steps.tag_version.outputs.new_tag }} - body: ${{ steps.tag_version.outputs.changelog }} - docker: - name: 도커 이미지 빌드와 푸시 - runs-on: ubuntu-latest - needs: tag - steps: - - uses: actions/checkout@v3 - - name: build 가져오기 - uses: actions/download-artifact@v3 - with: - name: build-artifact - path: build - - name: Docker Buildx 설치 - uses: docker/setup-buildx-action@v2 - - name: ghcr.io 로그인 - uses: docker/login-action@v2 - with: - registry: ghcr.io - username: ${{ github.actor }} - password: ${{ secrets.GITHUB_TOKEN }} - - name: set lower case owner name - run: | - echo "OWNER_LC=${OWNER,,}" >> ${GITHUB_ENV} - env: - OWNER: '${{ github.repository_owner }}' - - name: 빌드 앤 푸시 - uses: docker/build-push-action@v3 - with: - context: . - push: true - tags: | - ghcr.io/${{ env.OWNER_LC }}/tredpick-1:${{ needs.tag.outputs.tag_name }}, - ghcr.io/${{ env.OWNER_LC }}/tredpick-1:latest - cache-from: type=gha - cache-to: type=gha,mode=max - deploy: - name: 쿠버네티스 배포 - needs: [tag, docker] - runs-on: ubuntu-latest - steps: - - uses: azure/k8s-set-context@v2 - with: - method: kubeconfig - kubeconfig: ${{ secrets.KUBE_CONFIG }} - - run: | - kubectl set image deployment.apps/tredpick-1 tredpick-1=ghcr.io/angelsooho/tredpick-1:${{ needs.tag.outputs.tag_name }}