Skip to content

Commit

Permalink
💚 Git related image on uplaod
Browse files Browse the repository at this point in the history
  • Loading branch information
KONFeature committed Jul 10, 2024
1 parent 6eb0ff7 commit cb7c0e7
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
6 changes: 5 additions & 1 deletion .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,9 @@ jobs:
context: .
platforms: linux/arm64
push: true
tags: 262732185023.dkr.ecr.eu-west-1.amazonaws.com/indexer:latest
tags: |
262732185023.dkr.ecr.eu-west-1.amazonaws.com/indexer:latest
262732185023.dkr.ecr.eu-west-1.amazonaws.com/indexer:${{ github.sha }}
# Github actions cache
cache-from: type=gha
cache-to: type=gha,mode=max
Expand All @@ -82,3 +84,5 @@ jobs:
run: |
echo "Deploying with stage: prod"
pnpm sst deploy --stage prod
env:
COMMIT_SHA: ${{ github.sha }}
5 changes: 4 additions & 1 deletion sst.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,12 @@ function IndexerStack({ app, stack }: StackContext) {
repositoryName: "indexer",
}
);

const imageTag = process.env.COMMIT_SHA ?? "latest";
console.log(`Will use the image ${imageTag}`);
const indexerImage = ContainerImage.fromEcrRepository(
containerRegistry,
"latest"
imageTag
);

// The service itself
Expand Down

0 comments on commit cb7c0e7

Please sign in to comment.