Add ECR as Docker registry #7
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: New release | ||
on: | ||
push: | ||
tags: | ||
- v** | ||
jobs: | ||
release: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
packages: write | ||
contents: read | ||
steps: | ||
- | ||
name: Checkout | ||
uses: actions/checkout@v4 | ||
- | ||
name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v3 | ||
- | ||
name: Login to GitHub Container Registry | ||
uses: docker/login-action@v3 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
- | ||
name: Login to ECR | ||
uses: docker/login-action@v3 | ||
with: | ||
registry: ${{ variables.AWS_ECR_URI }} | ||
Check failure on line 32 in .github/workflows/release.yml GitHub Actions / New releaseInvalid workflow file
|
||
username: ${{ variables.AWS_ACCESS_KEY_ID }} | ||
password: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | ||
- | ||
name: Build and push | ||
uses: docker/build-push-action@v5 | ||
with: | ||
context: . | ||
push: true | ||
tags: | | ||
ghcr.io/stat-utils/stat-fastapi:latest | ||
${{ variables.AWS_ECR_URI }}/stat-utils/stat-fastapi:latest |