diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 4eaecfc5d..7f1423564 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -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) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 402524f66..b677496fa 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -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