Bump multer from 1.4.5-lts.1 to 2.1.1 #64
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: | ||
| branches: | ||
| - develop | ||
| - release* | ||
| tags: [v*] | ||
| paths-ignore: | ||
| - README.md | ||
| - CHANGELOG.md | ||
| - LICENSE | ||
| pull_request: | ||
| # Sequence of patterns matched against refs/heads | ||
| branches: | ||
| - develop | ||
| - release* | ||
| paths-ignore: | ||
| - README.md | ||
| - CHANGELOG.md | ||
| - LICENSE | ||
| env: | ||
| project: 'focal-freedom-236620' | ||
| image: 'controller' | ||
| jobs: | ||
| Build: | ||
| runs-on: ubuntu-latest | ||
| permissions: | ||
| contents: 'read' | ||
| id-token: 'write' | ||
| packages: 'write' | ||
| name: Preflight | ||
| steps: | ||
| - uses: actions/checkout@v3 | ||
| - uses: actions/setup-node@v3 | ||
| with: | ||
| node-version: 18 | ||
| - run: npm ci | ||
| - run: npm run standard | ||
| - run: | | ||
| npm i -g better-npm-audit | ||
| npx better-npm-audit audit -p | ||
| Tests: | ||
| needs: Build | ||
| runs-on: ubuntu-latest | ||
| permissions: | ||
| contents: 'read' | ||
| id-token: 'write' | ||
| packages: 'write' | ||
| issues: read | ||
| checks: write | ||
| pull-requests: write | ||
| strategy: | ||
| matrix: | ||
| node: [ 16, 17, 16, 19 ] | ||
| name: Node ${{ matrix.node }} Test | ||
| steps: | ||
| - uses: actions/checkout@v3 | ||
| - name: Setup Node ${{ matrix.node }} Test | ||
| uses: actions/setup-node@v3 | ||
| with: | ||
| node-version: ${{ matrix.node }} | ||
| - name: Cache Node Modules | ||
| uses: actions/cache@v3 | ||
| with: | ||
| path: | | ||
| node_modules | ||
| key: ${{ runner.os }}-controller-node_modules-${{ hashFiles('package-lock.json') }} | ||
| restore-keys: | | ||
| ${{ runner.os }}-controller-node_modules- | ||
| - run: npm ci | ||
| - run: npm run test -- junit | ||
| - run: npm run postman_test | ||
| - name: Publish Test Results | ||
| uses: EnricoMi/publish-unit-test-result-action@v2 | ||
| if: always() | ||
| with: | ||
| files: | | ||
| *-results.xml | ||
| Publish: | ||
| needs: [Build, Tests] | ||
| runs-on: ubuntu-latest | ||
| permissions: | ||
| contents: 'read' | ||
| id-token: 'write' | ||
| packages: 'write' | ||
| name: Publish Controller | ||
| steps: | ||
| - uses: actions/checkout@v3 | ||
| - uses: actions/setup-node@v3 | ||
| with: | ||
| node-version: 18 | ||
| - run: npm ci | ||
| - name: npm version | ||
| id: package-version | ||
| uses: martinbeentjes/npm-get-version-action@v1.3.1 | ||
| - name: package version | ||
| shell: bash | ||
| id: version | ||
| run: | | ||
| if [[ ${{ github.ref_name }} =~ ^v.* ]] ; then | ||
| echo "pkg_version=${{ steps.package-version.outputs.current-version}}" >> "${GITHUB_OUTPUT}" | ||
| else | ||
| echo "pkg_version=${{ steps.package-version.outputs.current-version}}-${{ github.run_number }}" >> "${GITHUB_OUTPUT}" | ||
| fi | ||
| - name: npm pack with version from package version | ||
| run: | | ||
| npm --no-git-tag-version version ${{ steps.version.outputs.pkg_version }} | ||
| npm pack | ||
| - name: Login to Github Container Registry | ||
| uses: docker/login-action@v2 | ||
| with: | ||
| registry: "ghcr.io" | ||
| username: ${{ github.actor }} | ||
| password: ${{ github.token }} | ||
| - name: Build and Push to ghcr | ||
| uses: docker/build-push-action@v3 | ||
| id: build_push_ghcr | ||
| with: | ||
| file: Dockerfile.dev | ||
| push: true | ||
| tags: | | ||
| ghcr.io/eclipse-iofog/controller:${{ steps.version.outputs.pkg_version }} | ||
| ghcr.io/eclipse-iofog/controller:latest | ||
| build-args: PKG_VERSION=${{ steps.version.outputs.pkg_version }} | ||
| - name: Build and Push to GCR | ||
| id: build_push_gcr | ||
| uses: RafikFarhad/push-to-gcr-github-action@v5-beta | ||
| with: | ||
| gcloud_service_key: ${{ secrets.GCLOUD_SERVICE_KEY }} | ||
| registry: gcr.io | ||
| project_id: ${{ env.project }} | ||
| image_name: ${{ env.image }} | ||
| image_tag: latest,${{ steps.version.outputs.pkg_version }} | ||
| dockerfile: Dockerfile.dev | ||
| build_args: PKG_VERSION=${{ steps.version.outputs.pkg_version }} | ||
| - run: ls | ||
| - name: Publish package to packagecloud | ||
| if: ${{ steps.build_push_gcr.outcome }} == 'success' | ||
|
Check warning on line 151 in .github/workflows/ci.yaml
|
||
| uses: danielmundi/upload-packagecloud@v1 | ||
| with: | ||
| PACKAGE-NAME: iofog-iofogcontroller-${{ steps.version.outputs.pkg_version }}.tgz | ||
| PACKAGECLOUD-USERNAME: iofog | ||
| PACKAGECLOUD-REPO: iofog-controller-snapshots | ||
| PACKAGECLOUD-DISTRIB: node | ||
| PACKAGECLOUD-TOKEN: ${{ secrets.packagecloud_token }} | ||