Skip to content

Commit

Permalink
refactor(workflows): 🎉 update action workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
gokhangunduz committed Dec 11, 2023
1 parent a6ddf4c commit e3ef5aa
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 26 deletions.
52 changes: 27 additions & 25 deletions .github/workflows/dev.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,28 +12,30 @@ jobs:
name: development

steps:
- name: Display environment secret variable
run: echo ${{ secrets.DOCKER_USERNAME }}

- name: Display environment secret variable
run: echo ${{ secrets.TEST2 }}

# - 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-dev \
# --tag robolaunchio/frontend-public:${{ steps.project_version.outputs.version }}-dev \
# .

# - 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/frontend-public:${{ steps.project_version.outputs.version }}-dev
- 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-dev \
--tag robolaunchio/frontend-public:${{ steps.project_version.outputs.version }}-dev \
--build-arg REACT_APP_BACKEND_URL=${{ secrets.DEV_REACT_APP_BACKEND_URL }} \
--build-arg REACT_APP_KEYCLOAK_URL=${{ secrets.DEV_REACT_APP_KEYCLOAK_URL }} \
--build-arg REACT_APP_KEYCLOAK_REALM=${{ secrets.DEV_REACT_APP_KEYCLOAK_REALM }} \
--build-arg REACT_APP_KEYCLOAK_CLIENT_ID=${{ secrets.DEV_REACT_APP_KEYCLOAK_CLIENT_ID }} \
--build-arg REACT_APP_APPLICATION=${{ secrets.DEV_REACT_APP_APPLICATION }} \
--build-arg REACT_APP_CREATE_ORGANIZATION=${{ secrets.DEV_REACT_APP_CREATE_ORGANIZATION }} \
--build-arg REACT_APP_CREATE_REGION=${{ secrets.DEV_REACT_APP_CREATE_REGION }} \
--build-arg REACT_APP_CREATE_INSTANCE=${{ secrets.DEV_REACT_APP_CREATE_INSTANCE }} \
.
- 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/frontend-public:${{ steps.project_version.outputs.version }}-dev
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ui",
"version": "0.21.5",
"version": "0.21.6",
"private": true,
"scripts": {
"dev": "react-scripts start",
Expand Down

0 comments on commit e3ef5aa

Please sign in to comment.