github: Push Docker images to ghcr.io instead of public.ecr.aws
This commit is contained in:
parent
4e86af5fdd
commit
378476c159
|
|
@ -7,14 +7,13 @@ on:
|
|||
- 'docs/**'
|
||||
- '.github/**'
|
||||
|
||||
permissions:
|
||||
id-token: write
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
deploy-docker:
|
||||
runs-on: ubuntu-latest
|
||||
name: build and deploy
|
||||
permissions:
|
||||
contents: read
|
||||
packages: write
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
|
|
@ -28,19 +27,13 @@ jobs:
|
|||
timeout-minutes: 1
|
||||
uses: docker/setup-buildx-action@v2
|
||||
|
||||
- name: Configure AWS credentials
|
||||
- name: Login to Github Packages
|
||||
timeout-minutes: 5
|
||||
uses: aws-actions/configure-aws-credentials@v2
|
||||
uses: docker/login-action@v2
|
||||
with:
|
||||
role-to-assume: ${{ secrets.AWS_ROLE }}
|
||||
aws-region: us-east-1
|
||||
|
||||
- name: Login to Amazon ECR Public
|
||||
timeout-minutes: 5
|
||||
id: login-ecr-public
|
||||
uses: aws-actions/amazon-ecr-login@v1
|
||||
with:
|
||||
registry-type: public
|
||||
registry: ghcr.io
|
||||
username: ${{ github.actor }}
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Build and push
|
||||
timeout-minutes: 30
|
||||
|
|
@ -49,4 +42,4 @@ jobs:
|
|||
context: .
|
||||
platforms: linux/amd64,linux/arm64
|
||||
push: true
|
||||
tags: ${{ steps.login-ecr-public.outputs.registry }}/johang/sd-card-images:latest
|
||||
tags: ghcr.io/johang/sd-card-images:latest
|
||||
|
|
|
|||
Loading…
Reference in New Issue