-
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.
feat(actions): 🎉 add github-action integrations
- Loading branch information
1 parent
2402da9
commit 5adabd7
Showing
5 changed files
with
48 additions
and
54 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: Docker Image (public-dev) | ||
|
||
on: | ||
push: | ||
tags: | ||
- "*" | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
environment: | ||
name: public-dev | ||
|
||
steps: | ||
- name: Checkout Code | ||
uses: actions/checkout@v3 | ||
|
||
- name: Extract Version from package.json | ||
id: project_version | ||
run: echo "::set-output name=version::$(node -e 'console.log(require("./package.json").version)')" | ||
|
||
- name: Build the Docker Image | ||
run: | | ||
docker build \ | ||
--file Dockerfile \ | ||
--tag robolaunchio/physical-robot-services-public:${{ steps.project_version.outputs.version }}-dev \ | ||
--build-arg APPLICATION_PORT=${{ secrets.APPLICATION_PORT }} \ | ||
--build-arg ROBOT_PORT=${{ secrets.ROBOT_PORT }} \ | ||
. | ||
- name: Login to Docker Hub | ||
run: docker login -u ${{ secrets.DOCKER_USERNAME }} -p ${{ secrets.DOCKER_PASSWORD }} | ||
|
||
- name: Push the Docker Image to Docker Hub | ||
run: docker push robolaunchio/physical-robot-services-public:${{ steps.project_version.outputs.version }}-dev |
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,11 @@ | ||
FROM node:latest as build-stage | ||
ARG APPLICATION_PORT | ||
ARG ROBOT_PORT | ||
COPY . /app | ||
WORKDIR /app | ||
RUN npm install | ||
RUN npm run build | ||
FROM node:latest as production-stage | ||
COPY --from=build-stage /app/build /app | ||
EXPOSE 8077 | ||
ENTRYPOINT [ "node" , "app/app.js" ] |
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 was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.