diff --git a/.gitea/workflows/alpine.yaml b/.gitea/workflows/alpine.yaml index 6969247..720fe29 100644 --- a/.gitea/workflows/alpine.yaml +++ b/.gitea/workflows/alpine.yaml @@ -35,6 +35,22 @@ jobs: version: - "3.5" - "3.6" + - "3.7" + - "3.8" + - "3.9" + - "3.10" + - "3.11" + - "3.12" + - "3.13" + - "3.14" + - "3.15" + - "3.16" + - "3.17" + - "3.18" + - "3.19" + - "3.20" + - "3.21" + - "edge" steps: - name: Check out repository code uses: actions/checkout@v4 @@ -47,7 +63,7 @@ jobs: # uses: docker/setup-qemu-action@v3 - name: Setup Docker buildx uses: docker/setup-buildx-action@v3 - - name: Build and push alpine ${{ matrix.version }} + - name: Build and push container image uses: docker/build-push-action@v5 with: # platforms: linux/amd64,linux/arm64 @@ -57,6 +73,33 @@ jobs: ALPINE_VERSION=${{ matrix.version }} tags: | ${{ vars.DOCKERHUB_USERNAME }}/alpine:${{ matrix.version }} + - name: Scan container image with Trivy + uses: aquasecurity/trivy-action@0.20.0 + with: + image-ref: '${{ vars.DOCKERHUB_USERNAME }}/alpine:${{ matrix.version }}' + format: 'sarif' + output: 'trivy-results.sarif' + + build-latest: + name: Build latest alpine linux container images + container: + image: ghcr.io/catthehacker/ubuntu:act-latest + runs-on: ubuntu-latest + needs: + - prepare + - build + steps: + - name: Check out repository code + uses: actions/checkout@v4 + - name: Login to docker.io + uses: docker/login-action@v3 + with: + username: ${{ vars.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + # - name: Set up QEMU + # uses: docker/setup-qemu-action@v3 + - name: Setup Docker buildx + uses: docker/setup-buildx-action@v3 - name: Build latest version uses: docker/build-push-action@v5 with: @@ -65,15 +108,9 @@ jobs: context: . tags: | ${{ vars.DOCKERHUB_USERNAME }}/alpine:latest - # - name: Scan alpine9 image with Trivy - # uses: aquasecurity/trivy-action@0.20.0 - # with: - # image-ref: '${{ vars.DOCKERHUB_USERNAME }}/alpine:9.5' - # format: 'sarif' - # output: 'trivy-results.sarif' - # - name: Scan alpine9-micro image with Trivy - # uses: aquasecurity/trivy-action@0.20.0 - # with: - # image-ref: '${{ vars.DOCKERHUB_USERNAME }}/alpine:9.5-micro' - # format: 'sarif' - # output: 'trivy-results.sarif' + - name: Scan container image with Trivy + uses: aquasecurity/trivy-action@0.20.0 + with: + image-ref: '${{ vars.DOCKERHUB_USERNAME }}/alpine:latest' + format: 'sarif' + output: 'trivy-results.sarif'