Skip to content
This repository was archived by the owner on Jan 15, 2026. It is now read-only.

Commit b60516b

Browse files
authored
Merge pull request #34 from uswitch/gha_migration
Migrating Hermod to use GitHub Actions
2 parents ea8b04d + 7e09db8 commit b60516b

3 files changed

Lines changed: 65 additions & 63 deletions

File tree

.drone.yml

Lines changed: 0 additions & 62 deletions
This file was deleted.

.github/workflows/push.yaml

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
name: push
2+
3+
on: push
4+
5+
permissions:
6+
contents: read
7+
id-token: write
8+
9+
jobs:
10+
test:
11+
runs-on: ubuntu-latest
12+
env:
13+
GO111MODULE: "on"
14+
steps:
15+
- uses: actions/checkout@v4
16+
- uses: actions/setup-go@v4
17+
with:
18+
go-version: "1.18"
19+
- run: CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go test -v -cover $(go list ./...)
20+
21+
build:
22+
needs: test
23+
runs-on: ubuntu-latest
24+
env:
25+
GO111MODULE: "on"
26+
steps:
27+
- uses: actions/checkout@v4
28+
- uses: actions/setup-go@v4
29+
with:
30+
go-version: "1.18"
31+
- run: CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o bin/hermod-linux-amd64 .
32+
- uses: actions/upload-artifact@v4
33+
with:
34+
name: bin
35+
path: bin/
36+
37+
docker:
38+
needs: build
39+
runs-on: ubuntu-latest
40+
steps:
41+
- uses: actions/checkout@v4
42+
- uses: actions/download-artifact@v4
43+
with:
44+
name: bin
45+
path: bin/
46+
- name: Login to Quay.io
47+
uses: docker/login-action@v3
48+
with:
49+
registry: quay.io
50+
username: ${{ secrets.QUAY_USERNAME }}
51+
password: ${{ secrets.QUAY_PASSWORD }}
52+
- id: meta
53+
uses: docker/metadata-action@v5
54+
with:
55+
images: quay.io/uswitch/hermod
56+
tags: |
57+
type=semver,pattern={{raw}}
58+
type=sha,prefix=,format=long
59+
- uses: docker/build-push-action@v6
60+
with:
61+
context: .
62+
labels: ${{ steps.meta.outputs.labels }}
63+
push: true
64+
tags: ${{ steps.meta.outputs.tags }}

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,6 @@ FROM scratch
66

77
COPY --from=base /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/
88

9-
ADD bin/hermod-linux-amd64 hermod
9+
ADD --chmod=755 bin/hermod-linux-amd64 hermod
1010

1111
ENTRYPOINT ["/hermod"]

0 commit comments

Comments
 (0)