-
Notifications
You must be signed in to change notification settings - Fork 2
33 lines (31 loc) · 1012 Bytes
/
publish.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: Publish Docker image
on:
schedule:
- cron: '3 2 * * *'
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout Dodona repo
uses: actions/checkout@v2
with:
repository: 'dodona-edu/dodona'
ref: 'develop'
- name: Checkout docker files
uses: actions/checkout@v2
with:
path: docker-files
- name: Copy files
run: cp docker-files/* .
- name: Login to the container registry
run: echo ${{ secrets.GITHUB_TOKEN }} | docker login ghcr.io -u $GITHUB_ACTOR --password-stdin
- name: Download the latest image for caching
run: docker pull ghcr.io/dodona-edu/dodona:develop-latest
- name: Build the new image
run: docker build . -t ghcr.io/dodona-edu/dodona:develop-latest --cache-from ghcr.io/dodona-edu/dodona:develop-latest
- name: Push the new image
run: docker push ghcr.io/dodona-edu/dodona:develop-latest