Admin: Enable pushes to GHCR registry (#6080)

This commit is contained in:
Bert Blommers 2023-03-16 20:22:02 -01:00 committed by GitHub
parent 94100c116c
commit 0fb00eda5f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 20 additions and 5 deletions

View File

@ -118,12 +118,20 @@ jobs:
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push
- name: Login to GHCR
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Push to DockerHub and GHCR
uses: docker/build-push-action@v4
with:
push: true
platforms: linux/amd64,linux/arm64
tags: motoserver/moto:latest
tags: |
motoserver/moto:latest
ghcr.io/getmoto/motoserver:latest
- name: Get version number
run: |
version=$(grep -oP '(?<=__version__ = ")[0-9.a-z]+(?=")' moto/__init__.py)

View File

@ -60,13 +60,20 @@ jobs:
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- id: build_and_push
name: Build and push
- name: Login to GHCR
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Push to DockerHub and GHCR
uses: docker/build-push-action@v4
with:
platforms: linux/amd64,linux/arm64
push: true
tags: motoserver/moto:${{ env.VERSION }}
tags: |
motoserver/moto:${{ env.VERSION }}
ghcr.io/getmoto/motoserver:${{ env.VERSION }}
- name: Increase patch version number
run: |
python update_version_from_git.py patch