-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: George J Padayatti <[email protected]>
- Loading branch information
1 parent
869d9e3
commit d6711cd
Showing
3 changed files
with
58 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
name: Release docker image to docker hub | ||
|
||
on: | ||
release: | ||
types: [created] | ||
|
||
jobs: | ||
setup-build-publish-deploy: | ||
name: Setup, Build, Publish, and Deploy | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: Get the version | ||
id: get_version | ||
run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\//} | ||
|
||
- name: Extract tag from version | ||
id: extract_tag | ||
run: echo ::set-output name=TAG::$(echo ${{ steps.get_version.outputs.VERSION }} | sed 's/refs\/tags\///') | ||
|
||
- name: Set Docker Tag | ||
run: echo "DOCKER_HUB_TAG=${{steps.extract_tag.outputs.TAG}}" >> $GITHUB_ENV | ||
|
||
- name: Login to Docker Hub | ||
uses: docker/login-action@v3 | ||
with: | ||
username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.DOCKERHUB_TOKEN }} | ||
|
||
# Build docker image, publish docker image to docker hub | ||
- name: Build docker image, publish docker image to docker hub | ||
run: | | ||
make build/docker/deployable/dockerhub publish/dockerhub |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# https://github.com/GoogleContainerTools/distroless/tree/master/base | ||
# Predecessor to scratch + ca-certificates | ||
FROM frolvlad/alpine-glibc:glibc-2.30 | ||
|
||
# copy artifacts | ||
COPY dist/linux_amd64/bb-consent-api /app/bin/bb-consent-api | ||
COPY resources/assets/logo.jpeg /opt/bb-consent/api/assets/ | ||
COPY resources/assets/cover.jpeg /opt/bb-consent/api/assets/ | ||
COPY resources/assets/avatar.jpeg /opt/bb-consent/api/assets/ | ||
|
||
# start API | ||
EXPOSE 80 | ||
ENTRYPOINT ["./app/bin/bb-consent-api", "start-api", "--config", "config-production.json"] |