Skip to content

Commit 5656975

Browse files
authored
Merge pull request #36 from uswitch/airship-4689/migrate-to-github-actions
Airship-4689: migrate to github actions
2 parents 0d8b672 + 54ece83 commit 5656975

File tree

3 files changed

+57
-27
lines changed

3 files changed

+57
-27
lines changed

.drone.yml

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

.github/workflows/push.yaml

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

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ FROM gcr.io/distroless/static:nonroot
22

33
WORKDIR /
44

5-
COPY bin/heimdall-linux-amd64 heimdall
5+
COPY --chmod=755 bin/heimdall-linux-amd64 heimdall
66

77
USER nonroot:nonroot
88

0 commit comments

Comments
 (0)