Skip to content

Commit f89b89f

Browse files
committed
add GH-Action for grades-notifier container
1 parent 363a0e0 commit f89b89f

File tree

1 file changed

+38
-0
lines changed

1 file changed

+38
-0
lines changed
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: Grade Notifier Docker Publish
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
- dev*
8+
9+
jobs:
10+
docker-publish:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Checkout repository
14+
uses: actions/checkout@v2
15+
- name: Docker meta
16+
id: meta
17+
uses: docker/metadata-action@v3
18+
with:
19+
images: |
20+
ghcr.io/tinf21cs1/campusnet-grade-notifier
21+
# tags: latest, if default branch; name of branch; name of semver tag
22+
tags: |
23+
type=raw,value=latest,enable={{is_default_branch}}
24+
type=ref,event=branch
25+
- name: Login to GitHub Container Registry
26+
uses: docker/login-action@v1
27+
with:
28+
registry: ghcr.io
29+
username: ${{ github.actor }}
30+
password: ${{ github.token }}
31+
- name: Build and Push Docker Image
32+
uses: docker/build-push-action@v2
33+
with:
34+
platforms: linux/amd64
35+
context: ./grades-docker
36+
push: true # will only push if not a pull_request
37+
tags: ${{ steps.meta.outputs.tags }}
38+
labels: ${{ steps.meta.outputs.labels }}

0 commit comments

Comments
 (0)