Admin: Enable pushes to GHCR registry (#6080)
This commit is contained in:
parent
94100c116c
commit
0fb00eda5f
12
.github/workflows/build.yml
vendored
12
.github/workflows/build.yml
vendored
@ -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)
|
||||
|
13
.github/workflows/release.yml
vendored
13
.github/workflows/release.yml
vendored
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user