Skip to content

Commit

Permalink
Merge pull request #54 from OpenQDev/staging
Browse files Browse the repository at this point in the history
Staging
  • Loading branch information
Christopher-Stevers committed Aug 11, 2023
2 parents bbbf756 + b39f966 commit 6fd7a5c
Show file tree
Hide file tree
Showing 4 changed files with 54 additions and 66 deletions.
61 changes: 0 additions & 61 deletions .circleci/config.yml

This file was deleted.

51 changes: 51 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
#git add . && git commit -m "updates" && git push && git tag -f staging-1.0.0 && git push origin -f staging-1.0.1
name: Build + Push OpenQ-CoinAPI

on:
push:
tags:
- "staging-*"
- "production-*"

jobs:
build:
outputs:
ENVIRONMENT: ${{ steps.extract_environment.outputs.ENVIRONMENT }}
name: Build OpenQ-CoinAPI
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Extract environment from tag
id: extract_environment
run: |
ENVIRONMENT=$(echo "${{ github.ref_name }}" | sed 's/-.*//')
echo "ENVIRONMENT=$ENVIRONMENT" >> $GITHUB_ENV
echo "ENVIRONMENT=$ENVIRONMENT" >> $GITHUB_OUTPUT
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1

- name: Login to DockerHub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}

- name: Docker build
uses: docker/build-push-action@v4
with:
context: .
file: ./Dockerfile
push: true
tags: openq/openq-coinapi:${{ github.ref_name }}
tagHelm:
needs: build
uses: OpenQDev/OpenQ-Workflows/.github/workflows/tag.yml@main
with:
APP: coinapi
VERSION: ${{ github.ref_name }}
ENVIRONMENT: ${{ needs.build.outputs.ENVIRONMENT }}
secrets:
PAT: ${{ secrets.PAT }}
5 changes: 2 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
FROM node:18.14.1-alpine
WORKDIR /app
RUN apk update && apk upgrade && \
apk add --no-cache bash git
RUN apk update && apk upgrade && apk add --no-cache bash git
COPY package.json .
RUN yarn
COPY . .
EXPOSE 8080
ENTRYPOINT yarn start
ENTRYPOINT yarn start
3 changes: 1 addition & 2 deletions Dockerfile.dev
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
FROM node:18.14.1-alpine
WORKDIR /app
RUN apk update && apk upgrade && \
apk add --no-cache bash git
RUN apk update && apk upgrade && apk add --no-cache bash git
COPY package.json .
RUN yarn install
COPY . .
Expand Down

0 comments on commit 6fd7a5c

Please sign in to comment.