Admin: Allow different release tracks
This commit is contained in:
parent
deeddfb72b
commit
e1738d7363
12
.github/workflows/release.yml
vendored
12
.github/workflows/release.yml
vendored
@ -6,6 +6,10 @@ on:
|
||||
version:
|
||||
description: 'Version'
|
||||
required: true
|
||||
current_release:
|
||||
description: 'True to release Docker and update version info in moto/__init__.py'
|
||||
required: true
|
||||
type: boolean
|
||||
|
||||
jobs:
|
||||
release-moto-job:
|
||||
@ -44,9 +48,11 @@ jobs:
|
||||
- name: Build Python
|
||||
run: python -m build
|
||||
- name: Build Docker release
|
||||
if: ${{ inputs.current_release }}
|
||||
run: |
|
||||
docker build -t motoserver/moto . --tag moto:${{ env.VERSION }}
|
||||
- name: Test Docker release
|
||||
if: ${{ inputs.current_release }}
|
||||
run: |
|
||||
docker run -p 5000:5000 --name moto motoserver/moto &
|
||||
TEST_SERVER_MODE=true pytest -sv tests/test_core tests/test_s3/test_s3.py
|
||||
@ -66,21 +72,26 @@ jobs:
|
||||
# Required to get the correct Digest
|
||||
# See https://github.com/docker/build-push-action/issues/461
|
||||
- name: Set up QEMU
|
||||
if: ${{ inputs.current_release }}
|
||||
uses: docker/setup-qemu-action@v3
|
||||
- name: Set up Docker Buildx
|
||||
if: ${{ inputs.current_release }}
|
||||
uses: docker/setup-buildx-action@v3
|
||||
- name: Login to DockerHub
|
||||
if: ${{ inputs.current_release }}
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||
- name: Login to GHCR
|
||||
if: ${{ inputs.current_release }}
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
registry: ghcr.io
|
||||
username: ${{ github.actor }}
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
- name: Push to DockerHub and GHCR
|
||||
if: ${{ inputs.current_release }}
|
||||
id: build_and_push
|
||||
uses: docker/build-push-action@v5
|
||||
with:
|
||||
@ -90,6 +101,7 @@ jobs:
|
||||
motoserver/moto:${{ env.VERSION }}
|
||||
ghcr.io/getmoto/motoserver:${{ env.VERSION }}
|
||||
- name: Increase patch version number
|
||||
if: ${{ inputs.current_release }}
|
||||
run: |
|
||||
python update_version_from_git.py patch
|
||||
sed -i 's/Docker Digest for ${{ env.VERSION }}: <autopopulateddigest>/Docker Digest for ${{ env.VERSION }}: _${{ steps.build_and_push.outputs.digest }}_/' CHANGELOG.md
|
||||
|
Loading…
Reference in New Issue
Block a user