fix: local registry

This commit is contained in:
Eli Bosley
2023-08-31 11:05:17 -04:00
parent 0250b9e46f
commit 8e0bf02962

View File

@@ -23,16 +23,6 @@ jobs:
run: >
git config --global url."https://github.com/".insteadOf
ssh://git@github.com/
# Login to ECR
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v2
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_ACCESS_KEY_SECRET }}
aws-region: "us-west-2"
- name: Amazon ECR "Login" Action for GitHub Actions
id: login-ecr
uses: aws-actions/amazon-ecr-login@v1
- name: Tag
id: tag
run: |
@@ -42,16 +32,7 @@ jobs:
echo $image_tag
echo "tag=$image_tag" >> "$GITHUB_OUTPUT"
- uses: docker/setup-buildx-action@v1
- name: Build and push
uses: docker/build-push-action@v4
with:
context: api
target: builder
push: true
tags: ${{ steps.login-ecr.outputs.registry }}/${{ steps.tag.outputs.tag }}
cache-from: type=gha
cache-to: type=gha,mode=max
provenance: false
- name: Build
uses: docker/build-push-action@v4
with:
@@ -108,6 +89,9 @@ jobs:
with:
persist-credentials: true
- uses: docker/setup-buildx-action@v1
with:
# network=host driver-opt needed to push to local registry
driver-opts: network=host
- name: Build and push
uses: docker/build-push-action@v4