Skip to content

Commit 30d9b1e

Browse files
authored
Merge pull request #21 from kilnfi/chore/update-ci
chore: update ci to not build container images with goreleaser
2 parents ec783fe + 57781a1 commit 30d9b1e

File tree

5 files changed

+40
-59
lines changed

5 files changed

+40
-59
lines changed

.github/workflows/lint.yaml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ permissions:
1212
contents: read
1313

1414
jobs:
15-
golangci:
15+
codebase:
1616
name: lint
1717
runs-on: ubuntu-latest
1818
steps:
@@ -24,7 +24,8 @@ jobs:
2424
uses: golangci/golangci-lint-action@v6
2525
with:
2626
version: v1.60
27-
helm-lint:
27+
helm-chart:
28+
if: false
2829
runs-on: ubuntu-latest
2930
steps:
3031
- name: Checkout

.github/workflows/release.yaml

Lines changed: 34 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -15,22 +15,14 @@ env:
1515
REGISTRY: oci://ghcr.io/kilnfi/charts
1616

1717
jobs:
18-
goreleaser:
18+
binaries:
1919
runs-on: ubuntu-latest
2020
steps:
2121
- name: Checkout repository
2222
uses: actions/checkout@v4
2323
with:
2424
fetch-depth: 0
2525
fetch-tags: true
26-
- name: Set up QEMU
27-
uses: docker/setup-qemu-action@v3
28-
- name: Login to GitHub Container Registry
29-
uses: docker/login-action@v3
30-
with:
31-
registry: ghcr.io
32-
username: ${{ github.actor }}
33-
password: ${{ secrets.GITHUB_TOKEN }}
3426
- name: Set up Go
3527
uses: actions/setup-go@v5
3628
with:
@@ -44,9 +36,40 @@ jobs:
4436
env:
4537
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4638

47-
helm-release:
39+
images:
40+
runs-on: ubuntu-latest
41+
steps:
42+
- name: Checkout repository
43+
uses: actions/checkout@v4
44+
- name: Set up QEMU
45+
uses: docker/setup-qemu-action@v3
46+
- name: Login to GitHub Container Registry
47+
uses: docker/login-action@v3
48+
with:
49+
registry: ghcr.io
50+
username: ${{ github.actor }}
51+
password: ${{ secrets.GITHUB_TOKEN }}
52+
- uses: docker/build-push-action@v6
53+
name: Build & Push Container Images
54+
with:
55+
context: .
56+
file: Dockerfile
57+
labels: |-
58+
org.opencontainers.image.source=https://github.com/${{ github.repository }}
59+
org.opencontainers.image.revision=${{ github.sha }}
60+
org.opencontainers.image.name=cardano-validator-watcher"
61+
org.opencontainers.image.version=${{ github.ref_name }}"
62+
63+
platforms: linux/amd64,linux/arm64
64+
push: true
65+
tags: |-
66+
ghcr.io/${{ github.repository_owner }}/cardano-validator-watcher:${{ github.ref_name }}
67+
ghcr.io/${{ github.repository_owner }}/cardano-validator-watcher:latest
68+
69+
helm-chart:
70+
if: false
71+
needs: images
4872
runs-on: ubuntu-latest
49-
needs: goreleaser
5073
steps:
5174
- name: Checkout
5275
uses: actions/checkout@v4

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,3 +29,5 @@ testbin/
2929
# Others
3030
**/.DS_Store
3131
*.db*
32+
33+
.codegpt

.goreleaser.yaml

Lines changed: 0 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ project_name: cardano-validator-watcher
33
before:
44
hooks:
55
- go mod tidy
6-
76
builds:
87
- id: cardano-validator-watcher
98
main: cmd/watcher/main.go
@@ -12,54 +11,10 @@ builds:
1211
goos:
1312
- linux
1413
- darwin
15-
1614
archives:
1715
- format: tar.gz
1816
name_template: '{{ .Binary }}-{{ .Tag }}-{{ .Os }}-{{ .Arch }}'
1917
files:
2018
- none*
21-
22-
dockers:
23-
- image_templates:
24-
- 'ghcr.io/kilnfi/cardano-validator-watcher:{{ .Tag }}-amd64'
25-
dockerfile: Dockerfile
26-
use: buildx
27-
goos: linux
28-
goarch: amd64
29-
build_flag_templates:
30-
- "--pull"
31-
- "--build-arg=ARCH=linux/amd64"
32-
- "--platform=linux/amd64"
33-
- "--label=org.opencontainers.image.created={{ .Date }}"
34-
- "--label=org.opencontainers.image.name={{ .ProjectName }}"
35-
- "--label=org.opencontainers.image.revision={{ .FullCommit }}"
36-
- "--label=org.opencontainers.image.version={{ .Version }}"
37-
- "--label=org.opencontainers.image.source={{ .GitURL }}"
38-
39-
- image_templates:
40-
- 'ghcr.io/kilnfi/cardano-validator-watcher:{{ .Tag }}-arm64'
41-
dockerfile: Dockerfile
42-
use: buildx
43-
goos: linux
44-
goarch: arm64
45-
build_flag_templates:
46-
- "--pull"
47-
- "--build-arg=ARCH=linux/arm64"
48-
- "--platform=linux/arm64"
49-
- "--label=org.opencontainers.image.created={{ .Date }}"
50-
- "--label=org.opencontainers.image.name={{ .ProjectName }}"
51-
- "--label=org.opencontainers.image.revision={{ .FullCommit }}"
52-
- "--label=org.opencontainers.image.version={{ .Version }}"
53-
- "--label=org.opencontainers.image.source={{ .GitURL }}"
54-
55-
docker_manifests:
56-
- name_template: 'ghcr.io/kilnfi/cardano-validator-watcher:{{ .Tag }}'
57-
image_templates:
58-
- 'ghcr.io/kilnfi/cardano-validator-watcher:{{ .Tag }}-amd64'
59-
- 'ghcr.io/kilnfi/cardano-validator-watcher:{{ .Tag }}-arm64'
60-
- name_template: 'ghcr.io/kilnfi/cardano-validator-watcher:latest'
61-
image_templates:
62-
- 'ghcr.io/kilnfi/cardano-validator-watcher:{{ .Tag }}-amd64'
63-
- 'ghcr.io/kilnfi/cardano-validator-watcher:{{ .Tag }}-arm64'
6419
changelog:
6520
disable: true

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,4 +36,4 @@ RUN apk --no-cache add ca-certificates curl sqlite \
3636
COPY --from=builder /usr/local/bin/cardano-validator-watcher .
3737
COPY --from=builder /workspace/bin /usr/local/bin
3838

39-
ENTRYPOINT ["/home/cardano/cardano-validator-watcher"]
39+
ENTRYPOINT ["./cardano-validator-watcher"]

0 commit comments

Comments
 (0)