fix(deps): update module github.com/gin-contrib/gzip to v1.2.6 (#240) #189
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: Build | |
| on: | |
| push: | |
| branches: | |
| - main | |
| tags: | |
| - "*" | |
| workflow_call: | |
| workflow_dispatch: | |
| permissions: | |
| contents: write | |
| packages: write | |
| security-events: write | |
| jobs: | |
| images: | |
| name: Images | |
| runs-on: ubuntu-24.04 | |
| strategy: | |
| matrix: | |
| include: | |
| - name: nethsecurity-vpn | |
| directory: vpn | |
| - name: nethsecurity-api | |
| directory: api | |
| - name: nethsecurity-proxy | |
| directory: proxy | |
| - name: nethsecurity-ui | |
| directory: ui | |
| steps: | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v4 | |
| - name: Checkout repo | |
| uses: actions/checkout@v6 | |
| - name: Generate metadata | |
| id: meta | |
| uses: docker/metadata-action@v6 | |
| with: | |
| images: ghcr.io/${{ github.repository_owner }}/${{ matrix.name }} | |
| tags: | | |
| type=ref,event=branch | |
| type=ref,event=pr | |
| type=semver,pattern={{version}} | |
| - name: Login to registry | |
| uses: docker/login-action@v4 | |
| with: | |
| registry: ghcr.io | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Build image | |
| id: build | |
| uses: docker/build-push-action@v7 | |
| with: | |
| push: true | |
| context: ${{ matrix.directory }} | |
| tags: ${{ steps.meta.outputs.tags }} | |
| labels: ${{ steps.meta.outputs.labels }} | |
| target: dist | |
| cache-to: type=gha,mode=max,scope=${{ matrix.directory }} | |
| cache-from: type=gha,scope=${{ matrix.directory }} | |
| file: ${{ matrix.directory }}/Containerfile | |
| - name: Generate image output | |
| run: | | |
| echo "built_image_sha=${{ fromJSON(steps.meta.outputs.json).tags[0] }}@${{ steps.build.outputs.imageid }}" >> $GITHUB_ENV | |
| - name: Generate sarif scan | |
| uses: aquasecurity/[email protected] | |
| with: | |
| image-ref: ${{ env.built_image_sha }} | |
| format: sarif | |
| output: ${{ matrix.directory }}.sarif | |
| - name: Upload sarif scan | |
| uses: github/codeql-action/upload-sarif@v4 | |
| with: | |
| sarif_file: ${{ matrix.directory }}.sarif | |
| category: ${{ matrix.directory }} | |
| - name: Update GitHub dependency tree | |
| uses: aquasecurity/[email protected] | |
| with: | |
| image-ref: ${{ env.built_image_sha }} | |
| format: 'github' | |
| output: ${{ matrix.directory }}.github.json | |
| github-pat: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Generate SBOM | |
| if: ${{ startsWith(github.ref, 'refs/tags/') }} | |
| uses: aquasecurity/[email protected] | |
| with: | |
| image-ref: ${{ env.built_image_sha }} | |
| format: 'cyclonedx' | |
| output: ${{ matrix.directory }}.cdx.json | |
| - name: Upload SBOM to release | |
| if: ${{ startsWith(github.ref, 'refs/tags/') }} | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: | | |
| gh release upload ${{ github.ref_name }} ${{ matrix.directory }}.cdx.json |