Skip to content

Commit

Permalink
fix: 打包bugfix
Browse files Browse the repository at this point in the history
  • Loading branch information
linyuan0213 committed Jun 11, 2024
1 parent 58dbd03 commit 024dee0
Showing 1 changed file with 11 additions and 6 deletions.
17 changes: 11 additions & 6 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,18 @@ jobs:
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v4
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: ${{ env.AWS_REGION }}

- name: Log in to Amazon ECR
id: login-ecr
uses: aws-actions/amazon-ecr-login@v2
with:
region: ${{ secrets.AWS_REGION }}
access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
registry-type: public

- name: Build and Push Image
uses: docker/build-push-action@v5
Expand All @@ -57,8 +62,8 @@ jobs:
${{ secrets.DOCKER_USERNAME }}/nas-tools:${{ env.app_version }}
ghcr.io/${{ github.repository_owner }}/nas-tools:latest
ghcr.io/${{ github.repository_owner }}/nas-tools:${{ env.app_version }}
${{ steps.login-ecr.outputs.registry }}/${{ secrets.AWS_REGISTRY_ALIAS }}/nas-tools:latest
${{ steps.login-ecr.outputs.registry }}/${{ secrets.AWS_REGISTRY_ALIAS }}/nas-tools:${{ env.app_version }}
${{ steps.login-ecr-public.outputs.registry }}/${{ secrets.AWS_REGISTRY_ALIAS }}/nas-tools:latest
${{ steps.login-ecr-public.outputs.registry }}/${{ secrets.AWS_REGISTRY_ALIAS }}/nas-tools:${{ env.app_version }}
- name: Logout from Amazon ECR
run: docker logout ${{ steps.login-ecr.outputs.registry }}
run: docker logout ${{ steps.login-ecr-public.outputs.registry }}

0 comments on commit 024dee0

Please sign in to comment.