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:
|
with:
|
||||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
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
|
uses: docker/build-push-action@v4
|
||||||
with:
|
with:
|
||||||
push: true
|
push: true
|
||||||
platforms: linux/amd64,linux/arm64
|
platforms: linux/amd64,linux/arm64
|
||||||
tags: motoserver/moto:latest
|
tags: |
|
||||||
|
motoserver/moto:latest
|
||||||
|
ghcr.io/getmoto/motoserver:latest
|
||||||
- name: Get version number
|
- name: Get version number
|
||||||
run: |
|
run: |
|
||||||
version=$(grep -oP '(?<=__version__ = ")[0-9.a-z]+(?=")' moto/__init__.py)
|
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:
|
with:
|
||||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||||
- id: build_and_push
|
- name: Login to GHCR
|
||||||
name: Build and push
|
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
|
uses: docker/build-push-action@v4
|
||||||
with:
|
with:
|
||||||
platforms: linux/amd64,linux/arm64
|
platforms: linux/amd64,linux/arm64
|
||||||
push: true
|
push: true
|
||||||
tags: motoserver/moto:${{ env.VERSION }}
|
tags: |
|
||||||
|
motoserver/moto:${{ env.VERSION }}
|
||||||
|
ghcr.io/getmoto/motoserver:${{ env.VERSION }}
|
||||||
- name: Increase patch version number
|
- name: Increase patch version number
|
||||||
run: |
|
run: |
|
||||||
python update_version_from_git.py patch
|
python update_version_from_git.py patch
|
||||||
|
Loading…
Reference in New Issue
Block a user