This repository has been archived by the owner on Oct 27, 2022. It is now read-only.
-
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.
dockerfile, initial push to gcr workflow on tagging
- Loading branch information
Showing
2 changed files
with
48 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,22 @@ | ||
name: push docker image to gcr | ||
|
||
on: | ||
create: | ||
tags: | ||
- '*' | ||
|
||
jobs: | ||
push-docker-image-to-gcr: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: get the version | ||
id: get_tag_name | ||
run: echo ::set-output name=GIT_TAG_NAME::${GITHUB_REF/refs\/tags\//} | ||
- name: build then push to gcr | ||
uses: RafikFarhad/push-to-gcr-github-action@v3 | ||
with: | ||
gcloud_service_key: ${{ secrets.GC_GCR_SERVICE_KEY }} | ||
registry: us.gcr.io | ||
project_id: bilgge | ||
image_name: bilgge-api | ||
image_tag: ${{ steps.get_tag_name.outputs.GIT_TAG_NAME}},latest |
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,26 @@ | ||
FROM ghcr.io/graalvm/graalvm-ce:ol8-java8-21.0.0 AS builder | ||
|
||
RUN cd /root && \ | ||
curl -L https://github.com/sbt/sbt/releases/download/v1.4.7/sbt-1.4.7.tgz --output sbt.tgz && \ | ||
tar xvf sbt.tgz && \ | ||
mv -v sbt /opt/sbt | ||
|
||
ENV PATH="/opt/sbt/bin:${PATH}" | ||
|
||
RUN mkdir /source | ||
WORKDIR /source | ||
|
||
COPY . . | ||
RUN sbt packArchive | ||
|
||
FROM ghcr.io/graalvm/graalvm-ce:ol8-java8-21.0.0 | ||
|
||
RUN mkdir /app | ||
WORKDIR /app | ||
|
||
COPY --from=builder /source/target/bilgge-0.1.0.tar.gz . | ||
RUN tar xvf bilgge-0.1.0.tar.gz | ||
RUN rm -v bilgge-*.tar.gz && mv -v bilgge-* bilgge && cd bilgge/bin | ||
|
||
WORKDIR /app/bilgge/bin | ||
CMD ./bilgge |