-
Notifications
You must be signed in to change notification settings - Fork 2
33 lines (25 loc) · 989 Bytes
/
docker.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
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}