📦 Create a WBS Release #7
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: 📦 Create a WBS Release | |
on: | |
workflow_dispatch: | |
inputs: | |
image_name: | |
description: 'Image to release' | |
type: choice | |
required: true | |
default: 'wikibase' | |
options: | |
- deploy | |
- elasticsearch | |
- quickstatements | |
- wdqs | |
- wdqs-frontend | |
- wdqs-proxy | |
- wikibase | |
- All projects (images and deploy) with unreleased changes | |
dry_run: | |
description: "Dry run, don't do it yet." | |
type: boolean | |
required: true | |
default: true | |
permissions: | |
contents: write | |
packages: write | |
jobs: | |
release: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-tags: true | |
fetch-depth: 0 | |
- uses: ./.github/actions/setup-environment | |
with: | |
github_user: wikibase-suite-bot | |
github_token: ${{ secrets.GH_WBS_BOT_TOKEN }} | |
- uses: docker/login-action@v3 | |
with: | |
# implicitly docker hub | |
username: wmdetravisbot | |
password: ${{ secrets.WBS_PUBLISH_TOKEN }} | |
- name: Create release | |
run: | | |
set -e # abort on error | |
set -x # show commands | |
git config --global user.name 'wikibase suite github actions bot' | |
git config --global user.email '[email protected]' | |
if [ "${{ inputs.dry_run }}" == "true" ]; then | |
DRY_RUN_FLAG="--dry-run" | |
else | |
DRY_RUN_FLAG="" | |
fi | |
if [ "${{ inputs.image_name }}" == "All projects (images and deploy) with unreleased changes" ]; then | |
PROJECT_ARG="" | |
else | |
PROJECT_ARG="-p ${{ inputs.image_name }}" | |
fi | |
./nx release $PROJECT_ARG $DRY_RUN_FLAG |