Upgrades platform-plugin-aspects and enables Instructor Dashboard plugin #565
Workflow file for this run
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: Release | |
on: | |
pull_request: | |
types: [opened, synchronize, closed] | |
env: | |
TUTOR_ROOT: ./.ci/ | |
jobs: | |
release: | |
if: github.event.pull_request.merged == true && startsWith(github.head_ref, 'bot/v') | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Create tag | |
id: tag_version | |
uses: mathieudutour/github-tag-action@v6.1 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
default_bump: false | |
default_prerelease_bump: false | |
- name: Create a GitHub release | |
if: steps.tag_version.outputs.new_tag | |
uses: ncipollo/release-action@v1 | |
with: | |
tag: ${{ steps.tag_version.outputs.new_tag }} | |
name: Release ${{ steps.tag_version.outputs.new_tag }} | |
body: ${{ steps.tag_version.outputs.changelog }} | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: setup python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: 3.12 | |
- name: Install pip | |
run: pip install -r requirements/pip.txt | |
- name: Build package | |
run: make build-pythonpackage | |
- name: Publish to PyPI | |
uses: pypa/gh-action-pypi-publish@master | |
with: | |
user: __token__ | |
password: ${{ secrets.PYPI_UPLOAD_TOKEN }} | |
build: | |
strategy: | |
matrix: | |
service: | |
- name: aspects | |
repository: edunext/aspects | |
- name: aspects-superset | |
repository: edunext/aspects-superset | |
- name: openedx | |
repository: edunext/openedx-aspects | |
runs-on: ubuntu-latest | |
steps: | |
- name: Log in to Docker Hub | |
uses: docker/login-action@343f7c4344506bcbf9b4de18042ae17996df046d | |
with: | |
username: ${{ secrets.EDUNEXT_DOCKER_USERNAME }} | |
password: ${{ secrets.EDUNEXT_DOCKER_PASSWORD }} | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Update ASPECTS_VERSION | |
if: github.event.action == 'opened' || github.event.action == 'synchronize' | |
run: | | |
ASPECTS_VERSION=pr-${{ github.event.pull_request.number }} | |
sed -i "s/ASPECTS_VERSION: .*/ASPECTS_VERSION: $ASPECTS_VERSION/" .ci/config.yml | |
- name: setup python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: 3.8 | |
- name: Install aspects | |
run: pip install . | |
- name: Save config | |
run: tutor config save | |
- name: Setup Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Build Aspects Docker Images | |
if: github.event.action == 'opened' || github.event.action == 'synchronize' | |
run: | | |
tutor images build ${{ matrix.service.name }} | |
tutor images push ${{ matrix.service.name }} | |
- name: Build Aspects Docker Images Latest | |
if: github.event.pull_request.merged == true && startsWith(github.head_ref, 'bot/v') | |
run: | | |
tutor images build ${{ matrix.service.name }} --cache-to-registry -d '--tag=${{ matrix.service.repository }}:latest' | |
tutor images push ${{ matrix.service.name }} |