Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(ci): build images with dockerfile instead of ko #332

Merged
merged 2 commits into from
Jul 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion .github/workflows/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -86,15 +86,22 @@ jobs:
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Set up QEMU
uses: docker/setup-qemu-action@v3

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Download GoReleaser
run: go install github.com/goreleaser/goreleaser@v1.23.0

- name: Run GoReleaser
uses: testifysec/witness-run-action@85ddab8b46a86b2905a3b547a1806ab264fbb810
uses: testifysec/witness-run-action@cceed291062b350dc658d7d189933ac47d4f4dec
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_REPOSITORY_OWNER: ${{ github.repository_owner }}
with:
witness-install-dir: /opt/witness
step: "build"
attestations: "github"
command: goreleaser release --clean
3 changes: 2 additions & 1 deletion .github/workflows/witness.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,9 @@ jobs:
go-version: 1.21.x

- if: ${{ inputs.pull_request == false }}
uses: testifysec/witness-run-action@85ddab8b46a86b2905a3b547a1806ab264fbb810
uses: testifysec/witness-run-action@cceed291062b350dc658d7d189933ac47d4f4dec
with:
witness-install-dir: /opt/witness
step: ${{ inputs.step }}
attestations: ${{ inputs.attestations }}
command: /bin/sh -c "${{ inputs.command }}"
Expand Down
60 changes: 49 additions & 11 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -74,18 +74,56 @@ release:
prerelease: auto
github:
owner: "{{ .Env.GITHUB_REPOSITORY_OWNER }}"
dockers:
- image_templates:
- "ghcr.io/in-toto/archivista:{{ .Version }}-amd64"
use: buildx
build_flag_templates:
- "--pull"
- "--platform=linux/amd64"
extra_files:
- "archivista.graphql"
- "ent.graphql"
- "ent.resolvers.go"
- "entrypoint.sh"
- "gen.go"
- "generated.go"
- "go.mod"
- "go.sum"
- "resolver.go"
- "docs"
- "ent"
- "cmd"
- "ent"
- "pkg"
- image_templates:
- "ghcr.io/in-toto/archivista:{{ .Version }}-arm64"
use: buildx
build_flag_templates:
- "--pull"
- "--platform=linux/arm64"
extra_files:
- "archivista.graphql"
- "ent.graphql"
- "ent.resolvers.go"
- "entrypoint.sh"
- "gen.go"
- "generated.go"
- "go.mod"
- "go.sum"
- "resolver.go"
- "docs"
- "ent"
- "cmd"
- "ent"
- "pkg"
goarch: arm64
docker_manifests:
- name_template: "ghcr.io/in-toto/archivista:{{ .Version }}"
image_templates:
- "ghcr.io/in-toto/archivista:{{ .Version }}-amd64"
- "ghcr.io/in-toto/archivista:{{ .Version }}-arm64"
kos:
- repository: ghcr.io/in-toto/archivista
id: archivista
build: archivista
tags:
- '{{.Version}}'
bare: true
preserve_import_paths: false
creation_time: '{{.CommitTimestamp}}'
platforms:
- linux/amd64
- linux/arm64
- repository: ghcr.io/in-toto/archivistactl
id: archivistactl
build: archivistactl
Expand Down
Loading