Fix new docker workflow #780
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: [push] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- 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:${GITHUB_SHA} --target base | |
- name: Build Static files for OpenedX S3 | |
run: docker build . --file ./Dockerfile --tag ghcr.io/eol-uchile/edx-staging:s3-static-${GITHUB_SHA} --target s3 | |
- name: Login to GitHub Container Registry | |
if: github.ref == 'refs/heads/master' | |
uses: docker/login-action@v3 | |
with: | |
registry: ghcr.io | |
username: eolito | |
password: ${{ secrets.CR_PAT }} | |
- name: Push | |
if: github.ref == 'refs/heads/master' | |
run: | | |
docker push ghcr.io/eol-uchile/edx-staging:${GITHUB_SHA} | |
docker push ghcr.io/eol-uchile/edx-staging:s3-static-${GITHUB_SHA} |