Skip to content

Commit

Permalink
Merge pull request #47 from uswitch/AIRSHIP-3608-migrate-to-gha
Browse files Browse the repository at this point in the history
AIRSHIP-3608 migrate to GHA
  • Loading branch information
meghaniankov authored Feb 6, 2024
2 parents 24539bd + ef656f7 commit 0539607
Show file tree
Hide file tree
Showing 3 changed files with 60 additions and 43 deletions.
42 changes: 0 additions & 42 deletions .drone.yml

This file was deleted.

59 changes: 59 additions & 0 deletions .github/workflows/push.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: push

on: push

permissions:
contents: read
id-token: write

jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v4
with:
go-version: "1.20"
- run: make test

build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v4
with:
go-version: "1.20"
- run: make bin/vault-webhook-linux-amd64
- uses: actions/upload-artifact@v3
with:
name: bin
path: bin/

docker-build-push:
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/download-artifact@v3
with:
name: bin
path: bin/
- name: Login to Quay.io
uses: docker/login-action@v3
with:
registry: quay.io
username: ${{ secrets.QUAY_USERNAME }}
password: ${{ secrets.QUAY_PASSWORD }}
- id: meta
uses: docker/metadata-action@v5
with:
images: quay.io/uswitch/vault-webhook
tags: |
type=sha,prefix=,format=long
type=semver,pattern={{raw}}
- uses: docker/build-push-action@v5
with:
context: .
labels: ${{ steps.meta.outputs.labels }}
push: true
tags: ${{ steps.meta.outputs.tags }}
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
FROM gcr.io/distroless/static:nonroot

WORKDIR /
COPY bin/vault-webhook-linux-amd64 vault-webhook
COPY --chmod=755 bin/vault-webhook-linux-amd64 vault-webhook
USER nonroot:nonroot

ENTRYPOINT ["/vault-webhook"]

0 comments on commit 0539607

Please sign in to comment.