Skip to content

Commit

Permalink
storing docker images - v3
Browse files Browse the repository at this point in the history
  • Loading branch information
pthomison committed Mar 23, 2024
1 parent 5554979 commit fdc4cf0
Showing 1 changed file with 20 additions and 17 deletions.
37 changes: 20 additions & 17 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@ jobs:
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v4 # More information on this action can be found below in the 'AWS Credentials' section
with:
# role-to-assume: arn:aws:iam::123456789012:role/my-github-actions-role
aws-region: us-east-2
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
Expand All @@ -75,26 +74,30 @@ jobs:
id: login-ecr
uses: aws-actions/amazon-ecr-login@v2

- name: Build, tag, and push docker image to Amazon ECR
# - name: Build, tag, and push docker image to Amazon ECR
# env:
# REGISTRY: ${{ steps.login-ecr.outputs.registry }}
# REPOSITORY: k3auto
# IMAGE_TAG: testing-${{ github.sha }}
# run: |
# docker build -t $REGISTRY/$REPOSITORY:$IMAGE_TAG .
# docker push $REGISTRY/$REPOSITORY:$IMAGE_TAG

- name: Build and push
uses: docker/build-push-action@v5
env:
REGISTRY: ${{ steps.login-ecr.outputs.registry }}
REPOSITORY: k3auto
IMAGE_TAG: testing-${{ github.sha }}
run: |
docker build -t $REGISTRY/$REPOSITORY:$IMAGE_TAG .
docker push $REGISTRY/$REPOSITORY:$IMAGE_TAG
# - name: Build and push
# uses: docker/build-push-action@v5
# with:
# context: .
# file: testing.Dockerfile
# platforms: linux/amd64
# labels: ${{ steps.meta.outputs.labels }}
# push: true
# tags: ghcr.io/${{ github.repository }}:testing-${{ github.sha }}
# cache-from: type=registry,ref=ghcr.io/${{ github.repository }}:testing-buildcache
# cache-to: type=registry,ref=ghcr.io/${{ github.repository }}:testing-buildcache,mode=max
with:
context: .
file: testing.Dockerfile
platforms: linux/amd64
labels: ${{ steps.meta.outputs.labels }}
push: true
tags: $REGISTRY/$REPOSITORY:$IMAGE_TAG
cache-from: type=registry,ref=$REGISTRY/$REPOSITORY:$IMAGE_TAG-buildcache
cache-to: type=registry,ref=$REGISTRY/$REPOSITORY:$IMAGE_TAG-buildcache,mode=max

- uses: actions/setup-go@v5
with:
Expand Down

0 comments on commit fdc4cf0

Please sign in to comment.