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/**'
|
- 'docs/**'
|
||||||
- '.github/**'
|
- '.github/**'
|
||||||
|
|
||||||
permissions:
|
|
||||||
id-token: write
|
|
||||||
contents: read
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
deploy-docker:
|
deploy-docker:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
name: build and deploy
|
name: build and deploy
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
packages: write
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
|
|
@ -28,19 +27,13 @@ jobs:
|
||||||
timeout-minutes: 1
|
timeout-minutes: 1
|
||||||
uses: docker/setup-buildx-action@v2
|
uses: docker/setup-buildx-action@v2
|
||||||
|
|
||||||
- name: Configure AWS credentials
|
- name: Login to Github Packages
|
||||||
timeout-minutes: 5
|
timeout-minutes: 5
|
||||||
uses: aws-actions/configure-aws-credentials@v2
|
uses: docker/login-action@v2
|
||||||
with:
|
with:
|
||||||
role-to-assume: ${{ secrets.AWS_ROLE }}
|
registry: ghcr.io
|
||||||
aws-region: us-east-1
|
username: ${{ github.actor }}
|
||||||
|
password: ${{ secrets.GITHUB_TOKEN }}
|
||||||
- name: Login to Amazon ECR Public
|
|
||||||
timeout-minutes: 5
|
|
||||||
id: login-ecr-public
|
|
||||||
uses: aws-actions/amazon-ecr-login@v1
|
|
||||||
with:
|
|
||||||
registry-type: public
|
|
||||||
|
|
||||||
- name: Build and push
|
- name: Build and push
|
||||||
timeout-minutes: 30
|
timeout-minutes: 30
|
||||||
|
|
@ -49,4 +42,4 @@ jobs:
|
||||||
context: .
|
context: .
|
||||||
platforms: linux/amd64,linux/arm64
|
platforms: linux/amd64,linux/arm64
|
||||||
push: true
|
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