Show transcript for lectures with subtitles #1945
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: Deploy to Test Server | |
on: | |
pull_request: | |
# The branches below must be a subset of the branches above | |
branches: [ dev ] | |
permissions: | |
packages: write | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
ref: ${{ github.event.pull_request.head.sha }} | |
- name: Set outputs | |
id: vars | |
run: echo "::set-output name=sha_short::$(git rev-parse --short HEAD)" | |
- name: Docker meta | |
id: meta | |
uses: docker/metadata-action@v4 | |
with: | |
images: ghcr.io/tum-dev/gocast/test-server | |
tags: | | |
type=sha | |
flavor: | | |
latest=true | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v2 | |
- name: Login to DockerHub | |
uses: docker/login-action@v2 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Build and push Docker images | |
uses: docker/build-push-action@v4 | |
with: | |
context: . | |
pull: true | |
push: true | |
build-args: version=${{ steps.vars.outputs.sha_short }} | |
tags: ${{ steps.meta.outputs.tags }} | |
labels: ${{ steps.meta.outputs.labels }} | |
- name: Docker meta | |
id: metaWorker | |
uses: docker/metadata-action@v4 | |
with: | |
images: ghcr.io/tum-dev/gocast/test-worker | |
tags: | | |
type=sha | |
flavor: | | |
latest=true | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v2 | |
- name: Login to DockerHub | |
uses: docker/login-action@v2 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Build and push Docker images | |
uses: docker/build-push-action@v4 | |
with: | |
context: worker | |
pull: true | |
push: true | |
build-args: version=${{ steps.vars.outputs.sha_short }} | |
tags: ${{ steps.metaWorker.outputs.tags }} | |
labels: ${{ steps.metaWorker.outputs.labels }} | |
- name: Pull new Container | |
run: | | |
curl -X POST -H "Content-Type: application/json" -H "Authorization: Token ${{ secrets.TESTSERVER_UPDATER_SECRET }}" -d '${{ toJSON(steps.meta.outputs) }}' https://update.test.live.mm.rbg.tum.de/add?num=${{ github.event.number }} |