Bump axios from 0.24.0 to 0.30.2 in /next-app #394
Workflow file for this run
This file contains hidden or 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: CI | |
| on: push | |
| jobs: | |
| install-dependencies: | |
| name: Install dependencies | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout Repo | |
| uses: actions/checkout@v2 | |
| - name: Install Dependencies | |
| run: cd ./next-app && yarn install --frozen-lockfile | |
| - name: Cache node_modules | |
| uses: actions/cache@v4 | |
| with: | |
| path: './next-app/node_modules' | |
| key: ${{ runner.os }}-next-${{ hashFiles('./next-app/yarn.lock') }} | |
| eslint: | |
| name: ESLint | |
| runs-on: ubuntu-latest | |
| needs: install-dependencies | |
| steps: | |
| - name: Checkout Repo | |
| uses: actions/checkout@v2 | |
| - name: Cache node_modules | |
| uses: actions/cache@v4 | |
| with: | |
| path: './next-app/node_modules' | |
| key: ${{ runner.os }}-next-${{ hashFiles('./next-app/yarn.lock') }} | |
| - name: Run ESLint | |
| run: cd ./next-app && npx eslint @types src | |
| build-website: | |
| name: Website Build | |
| runs-on: ubuntu-latest | |
| needs: eslint | |
| steps: | |
| - name: Checkout Repo | |
| uses: actions/checkout@v2 | |
| - name: Cache node_modules | |
| uses: actions/cache@v4 | |
| with: | |
| path: './next-app/node_modules' | |
| key: ${{ runner.os }}-next-${{ hashFiles('./next-app/yarn.lock') }} | |
| - name: Build | |
| run: cd ./next-app && yarn build && yarn export | |
| - name: Package Jar | |
| run: cd next-app && ln -s out static && zip -0 -r next-app.jar static | |
| - name: Upload artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: next-app.jar | |
| path: next-app/next-app.jar | |
| ktLint: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v2 | |
| - name: Setup Java JDK | |
| uses: actions/setup-java@v1.4.3 | |
| with: | |
| java-version: 17 | |
| - name: Lint | |
| run: ./gradlew --continue ktlintCheck | |
| test-spring: | |
| name: Test Spring | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v2 | |
| - name: Setup Java JDK | |
| uses: actions/setup-java@v1.4.3 | |
| with: | |
| java-version: 17 | |
| - name: Test | |
| run: ./gradlew --continue test | |
| - name: Publish Test Report | |
| uses: scacap/action-surefire-report@v1 | |
| with: | |
| github_token: ${{ secrets.GITHUB_TOKEN }} | |
| report_paths: '**/build/test-results/test/TEST-*.xml' | |
| if: always() | |
| build: | |
| runs-on: ubuntu-latest | |
| needs: | |
| - ktLint | |
| - test-spring | |
| - build-website | |
| steps: | |
| - uses: actions/checkout@v2 | |
| - name: Setup Java JDK | |
| uses: actions/setup-java@v1.4.3 | |
| with: | |
| java-version: 17 | |
| - name: Download artifacts | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: next-app.jar | |
| path: next-app | |
| - name: Build Spring app | |
| run: ./gradlew bootjar | |
| - name: Upload artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: up.jar | |
| path: spring-app/build/libs/up.jar | |
| build-docker: | |
| runs-on: ubuntu-latest | |
| needs: build | |
| if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/develop' | |
| steps: | |
| - uses: actions/checkout@v2 | |
| - name: Download artifacts | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: up.jar | |
| path: spring-app/build/libs | |
| - name: Login into docker registry | |
| uses: docker/login-action@v2 | |
| with: | |
| registry: ${{ secrets.DOCKER_REGISTRY }} | |
| username: up | |
| password: ${{ secrets.DOCKER_PASSWORD }} | |
| - name: get up version | |
| run: echo "UP_VERSION=$(sed -n 's/^\s*version\s*=\s*"\(.*\)"/\1/p' spring-app/build.gradle.kts)" >> $GITHUB_ENV | |
| - name: Build and push docker image | |
| uses: docker/build-push-action@v3 | |
| with: | |
| context: . | |
| push: true | |
| tags: docker.snet.ovh/up/up:latest,docker.snet.ovh/up/up:${{ env.UP_VERSION }} |