Skip to content

Commit

Permalink
Use AWS ECR public repo
Browse files Browse the repository at this point in the history
  • Loading branch information
3benbox committed Jan 25, 2024
1 parent 3c79f6b commit fb46d53
Showing 1 changed file with 19 additions and 11 deletions.
30 changes: 19 additions & 11 deletions .github/workflows/create-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,20 +21,28 @@ jobs:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Log in to GitHub Container Registry
uses: docker/login-action@v1
- id: release
run: |
export TAG=$(cargo metadata --format-version=1 --no-deps | jq -r '.packages[0].version' )
echo "Releasing "$TAG
echo "tag=${TAG}" >> "$GITHUB_OUTPUT"
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to Public ECR
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build and push Docker image
registry: public.ecr.aws
username: ${{ secrets.AWS_ACCESS_KEY_ID }}
password: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
env:
AWS_REGION: us-east-1
- name: build and release docker image
uses: docker/build-push-action@v2
with:
context: .
file: ./Dockerfile.hermetic-driver
file: Dockerfile.hermetic-driver
platforms: linux/amd64 #,linux/arm64 - this fails because the rust-builder image isn't available for arm64
push: true
tags: |
ghcr.io/${{ github.repository }}/hermetic-driver:${{ github.sha }}
ghcr.io/${{ github.repository }}/hermetic-driver:latest
public.ecr.aws/r5b3e0r5/3box/hermetic-driver:latest
public.ecr.aws/r5b3e0r5/3box/hermetic-driver:${{ steps.release.outputs.tag }}

0 comments on commit fb46d53

Please sign in to comment.