chore: plugin version bumps #1028
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: Build Image | |
on: | |
pull_request: | |
types: [opened, synchronize, closed] | |
paths-ignore: | |
- .github/** | |
- .gitignore | |
env: | |
TUTOR_ROOT: ./.ci/ | |
jobs: | |
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 | |
if: "!startsWith(github.head_ref, 'dependabot/')" | |
steps: | |
- name: Log in to Docker Hub | |
continue-on-error: true | |
uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 | |
with: | |
username: ${{ secrets.EDUNEXT_DOCKER_USERNAME }} | |
password: ${{ secrets.EDUNEXT_DOCKER_PASSWORD }} | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Set outputs | |
id: vars | |
run: echo "sha_short=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT | |
- name: Update ASPECTS_VERSION | |
if: github.event.action == 'opened' || github.event.action == 'synchronize' | |
run: | | |
ASPECTS_VERSION=pr-${{ github.event.pull_request.number }}-${{ steps.vars.outputs.sha_short }} | |
sed -i "s/ASPECTS_VERSION: .*/ASPECTS_VERSION: $ASPECTS_VERSION/" .ci/config.yml | |
- name: setup python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: 3.12 | |
- name: Install aspects | |
run: | | |
pip install -r requirements/dev.txt | |
pip install -e . | |
- name: Save config | |
run: tutor config save | |
- name: Setup Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Build Aspects Docker Images | |
run: | | |
tutor images build ${{ matrix.service.name }} | |
- name: Push docker image | |
continue-on-error: true | |
if: github.event.action == 'opened' || github.event.action == 'synchronize' | |
run: | | |
tutor images push ${{ matrix.service.name }} | |
- name: Push latest docker image | |
continue-on-error: true | |
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 }} | |
docker image push ${{ matrix.service.repository }}:latest |