Docker Image CI #995
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: Docker Image CI | |
on: | |
merge_group: | |
types: [checks_requested] | |
pull_request: | |
types: | |
- opened | |
- reopened | |
- synchronize | |
branches: | |
- eol-release/** | |
- openuchile-release/** | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
variables: | |
uses: eol-uchile/edx-platform/.github/workflows/variables.yml@eol/koa.master # TODO: points to eol-release trunk | |
build: | |
needs: [ variables ] | |
runs-on: ubuntu-latest | |
permissions: | |
packages: write | |
env: | |
TS: ${{ needs.variables.outputs.timestamp }} | |
RELEASE-NAME: ${{ needs.variables.outputs.release-name }} | |
PROJECT: ${{ needs.variables.outputs.project }} | |
CODE: ${{ needs.variables.outputs.code }} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Pull submodules | |
run: git submodule update --init --recursive | |
- name: Build Open edX | |
run: docker build . --file ./Dockerfile --tag ghcr.io/eol-uchile/edx-staging:${{ env.CODE }}-${{ env.RELEASE-NAME }} --tag ghcr.io/eol-uchile/edx-staging:${{ env.CODE }}-${{ env.RELEASE-NAME }}-${{ env.TS }} --target base | |
- name: Build Static files for OpenedX S3 | |
run: docker build . --file ./Dockerfile --tag ghcr.io/eol-uchile/edx-staging:s3-static-${{ env.CODE }}-${{ env.RELEASE-NAME }} --tag ghcr.io/eol-uchile/edx-staging:s3-static-${{ env.CODE }}-${{ env.RELEASE-NAME }}-${{ env.TS }} --target s3 | |
- name: Login to GitHub Container Registry | |
if: ${{ github.event_name == 'merge_group' }} | |
uses: docker/login-action@v3 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Push | |
if: ${{ github.event_name == 'merge_group' }} | |
run: | | |
docker push ghcr.io/eol-uchile/edx-staging:${{ env.CODE }}-${{ env.RELEASE-NAME }} | |
docker push ghcr.io/eol-uchile/edx-staging:${{ env.CODE }}-${{ env.RELEASE-NAME }}-${{ env.TS }} | |
docker push ghcr.io/eol-uchile/edx-staging:s3-static-${{ env.CODE }}-${{ env.RELEASE-NAME }} | |
docker push ghcr.io/eol-uchile/edx-staging:s3-static-${{ env.CODE }}-${{ env.RELEASE-NAME }}-${{ env.TS }} | |
webhook: | |
needs: [ variables, build ] | |
if: ${{ github.event_name == 'merge_group' }} | |
uses: ./.github/workflows/webhook.yml | |
with: | |
code: ${{ needs.variables.outputs.code }} | |
secrets: inherit |