Skip to content

Commit

Permalink
Merge pull request #49 from QueroDelivery/cd-2450
Browse files Browse the repository at this point in the history
[CD-2450] - feat - WF_FONT_AWESOME_TOKEN/NEW_ENV
  • Loading branch information
FranklinZuniorr authored Oct 16, 2024
2 parents 37d6322 + ac3c6ab commit 6e5c017
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 3 deletions.
13 changes: 11 additions & 2 deletions .github/workflows/base_build_push_ecr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@ on:
type: boolean
default: false
required: false
WF_FONT_AWESOME_TOKEN:
type: string
required: false

secrets:
WF_NPM_TOKEN:
required: true
Expand All @@ -32,6 +36,8 @@ on:
required: true
WF_AWS_REGION:
required: true
WF_FONT_AWESOME_TOKEN:
required: false
outputs:
servicename:
description: "The service name"
Expand All @@ -41,6 +47,8 @@ on:
jobs:
setup:
name: preparing
env:
FONT_AWESOME_TOKEN: ${{ secrets.WF_FONT_AWESOME_TOKEN }}
runs-on: ubuntu-latest
environment: ${{inputs.WF_ENV_TYPE_DEPLOY}}
continue-on-error: false
Expand Down Expand Up @@ -141,7 +149,8 @@ jobs:
# Build a docker container and
# push it to ECR so that it can
# be deployed to ECS.
echo "registry=http://registry.npmjs.org/" > .npmrc && echo "${{ secrets.WF_NPM_USER }}:registry=https://npm.pkg.github.com" >> .npmrc && echo "//npm.pkg.github.com/:_authToken=${{ secrets.WF_NPM_TOKEN }}" >> .npmrc
echo "registry=http://registry.npmjs.org/" > .npmrc && echo "${{ secrets.WF_NPM_USER }}:registry=https://npm.pkg.github.com" >> .npmrc && echo "//npm.pkg.github.com/:_authToken=${{ secrets.WF_NPM_TOKEN }}" >> .npmrc && echo "@fortawesome:registry=https://npm.fontawesome.com/" >> .npmrc && echo "//npm.fontawesome.com/:_authToken=${{ secrets.WF_FONT_AWESOME_TOKEN }}" >> .npmrc
docker build --build-arg SERVICE_NAME=$SERVICE_NAME -t $ECR_REPOSITORY:$IMAGE_TAG -t $ECR_REPOSITORY:$VERSION_TAG .
docker tag $ECR_REPOSITORY:$IMAGE_TAG $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG
docker tag $ECR_REPOSITORY:$VERSION_TAG $ECR_REGISTRY/$ECR_REPOSITORY:$VERSION_TAG
Expand All @@ -158,4 +167,4 @@ jobs:
run: |
export SERVICE_NAME=${{inputs.WF_SERVICE_NAME}}
echo "servicename=$SERVICE_NAME" >> $GITHUB_OUTPUT
9 changes: 8 additions & 1 deletion .github/workflows/base_node_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ on:
WF_BACKSTAGE_URL:
type: string
required: false
WF_FONT_AWESOME_TOKEN:
type: string
required: false

secrets:
WF_NPM_TOKEN:
Expand All @@ -26,6 +29,8 @@ on:
required: true
WF_REGISTRY:
required: true
WF_FONT_AWESOME_TOKEN:
required: false
outputs:
servicename:
description: "The service name"
Expand All @@ -36,6 +41,8 @@ jobs:
setup:
environment: ${{inputs.WF_ENV_TYPE_DEPLOY}}
name: preparing
env:
FONT_AWESOME_TOKEN: ${{ secrets.WF_FONT_AWESOME_TOKEN }}
runs-on: ubuntu-latest
continue-on-error: false
outputs:
Expand Down Expand Up @@ -109,4 +116,4 @@ jobs:
id: serviceName
run: |
export SERVICE_NAME=`node -p -e "require('./package.json').name"`
echo "servicename=$SERVICE_NAME" >> $GITHUB_OUTPUT
echo "servicename=$SERVICE_NAME" >> $GITHUB_OUTPUT

0 comments on commit 6e5c017

Please sign in to comment.