From 3c752c31c8d9cbc42cf56423f2ba4b1fe77de15c Mon Sep 17 00:00:00 2001 From: sinadarbouy Date: Thu, 6 Jun 2024 15:56:51 +0200 Subject: [PATCH] added github action for Docker Scout compare --- .github/workflows/docker_scout.yaml | 59 +++++++++++++++++++++++++++++ 1 file changed, 59 insertions(+) create mode 100644 .github/workflows/docker_scout.yaml diff --git a/.github/workflows/docker_scout.yaml b/.github/workflows/docker_scout.yaml new file mode 100644 index 00000000..528ac2c2 --- /dev/null +++ b/.github/workflows/docker_scout.yaml @@ -0,0 +1,59 @@ +name: Build and release test + +on: + push: + branches: + - "feature/integrate_docker_scout_with_gitHub_actions" + tags: ["*"] + +permissions: + contents: write + +jobs: + build-and-release: + runs-on: ubuntu-latest + permissions: + contents: write + packages: write + steps: + - name: Checkout code + uses: actions/checkout@v4 + with: + fetch-depth: 0 + - name: Set up Go 1.22 + uses: actions/setup-go@v5 + with: + go-version: "1.22" + cache: true + - name: Install nfpm for building Linux packages + run: go install github.com/goreleaser/nfpm/v2/cmd/nfpm@latest + - name: Build and release binaries + run: make build-release + - name: Build and release Linux packages + run: make build-linux-packages + - name: Set up QEMU + uses: docker/setup-qemu-action@v3 + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + - name: Sign in to GitHub Container Registry + uses: docker/login-action@v3 + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + - name: Extract metadata + id: meta + uses: docker/metadata-action@v5 + with: + images: | + gatewaydio/gatewayd + ghcr.io/gatewayd-io/gatewayd + - name: Build and push Docker image + uses: docker/build-push-action@v5 + with: + context: . + platforms: linux/amd64 + load: true + provenance: mode=max + sbom: true + tags: "ghcr.io/sinadarbouy/gatewayd:test"