Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
teodoravasic committed Sep 26, 2024
1 parent bd0a461 commit 8af1d09
Showing 1 changed file with 32 additions and 12 deletions.
44 changes: 32 additions & 12 deletions .github/workflows/deploy-staging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,11 +66,11 @@ jobs:
aws-access-key-id: ${{ secrets.INSTALLER_DEV_AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.INSTALLER_DEV_AWS_SECRET_KEY }}
aws-region: us-east-1
- run: |-
aws codeartifact login --tool pip --domain energysage --domain-owner 659694780082 --repository cloud-engineering
aws codeartifact login --tool npm --domain energysage --domain-owner 659694780082 --repository cloud-engineering
poetry config http-basic.codeartifact aws $(aws codeartifact get-authorization-token --domain energysage --domain-owner 659694780082 --query authorizationToken --output text)
- name: Log into CodeArtifact
id: codeartifact-login
run: |
CODEARTIFACT_AUTH_TOKEN=$(aws codeartifact get-authorization-token --domain energysage --domain-owner 659694780082 --query authorizationToken --output text)
echo "CODEARTIFACT_AUTH_TOKEN=$CODEARTIFACT_AUTH_TOKEN" >> $GITHUB_OUTPUT
- name: install opentofu
uses: opentofu/setup-opentofu@v1
with:
Expand Down Expand Up @@ -147,7 +147,17 @@ jobs:
uses: actions/setup-node@v4
with:
node-version: '20.x'

- name: AWS login with DEV credentials
uses: aws-actions/configure-aws-credentials@v2
with:
aws-access-key-id: ${{ secrets.INSTALLER_DEV_AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.INSTALLER_DEV_AWS_SECRET_KEY }}
aws-region: us-east-1
- name: Log into CodeArtifact
id: codeartifact-login
run: |
CODEARTIFACT_AUTH_TOKEN=$(aws codeartifact get-authorization-token --domain energysage --domain-owner 659694780082 --query authorizationToken --output text)
echo "CODEARTIFACT_AUTH_TOKEN=$CODEARTIFACT_AUTH_TOKEN" >> $GITHUB_OUTPUT
- name: Install dependencies
run: cd frontend && npm install

Expand Down Expand Up @@ -209,11 +219,11 @@ jobs:
aws-access-key-id: ${{ secrets.INSTALLER_DEV_AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.INSTALLER_DEV_AWS_SECRET_KEY }}
aws-region: us-east-1
- run: |-
aws codeartifact login --tool pip --domain energysage --domain-owner 659694780082 --repository cloud-engineering
aws codeartifact login --tool npm --domain energysage --domain-owner 659694780082 --repository cloud-engineering
poetry config http-basic.codeartifact aws $(aws codeartifact get-authorization-token --domain energysage --domain-owner 659694780082 --query authorizationToken --output text)
- name: Log into CodeArtifact
id: codeartifact-login
run: |
CODEARTIFACT_AUTH_TOKEN=$(aws codeartifact get-authorization-token --domain energysage --domain-owner 659694780082 --query authorizationToken --output text)
echo "CODEARTIFACT_AUTH_TOKEN=$CODEARTIFACT_AUTH_TOKEN" >> $GITHUB_OUTPUT
- name: Login to Amazon ECR
id: login-ecr
Expand Down Expand Up @@ -272,7 +282,17 @@ jobs:

steps:
- uses: actions/checkout@v4

- name: AWS login with DEV credentials
uses: aws-actions/configure-aws-credentials@v2
with:
aws-access-key-id: ${{ secrets.INSTALLER_DEV_AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.INSTALLER_DEV_AWS_SECRET_KEY }}
aws-region: us-east-1
- name: Log into CodeArtifact
id: codeartifact-login
run: |
CODEARTIFACT_AUTH_TOKEN=$(aws codeartifact get-authorization-token --domain energysage --domain-owner 659694780082 --query authorizationToken --output text)
echo "CODEARTIFACT_AUTH_TOKEN=$CODEARTIFACT_AUTH_TOKEN" >> $GITHUB_OUTPUT
- name: install opentofu
uses: opentofu/setup-opentofu@v1
with:
Expand Down

0 comments on commit 8af1d09

Please sign in to comment.