Skip to content

Commit 7a939de

Browse files
committed
Add GitHub workflow
1 parent ebab118 commit 7a939de

2 files changed

Lines changed: 36 additions & 0 deletions

File tree

.github/workflows/docker-build.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: Build Tutorial Container
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
paths-ignore:
8+
- "*.md"
9+
- slides/**
10+
- images/**
11+
- .gitignore
12+
workflow_dispatch:
13+
14+
jobs:
15+
build-and-push:
16+
runs-on: ubuntu-latest
17+
permissions:
18+
packages: write
19+
steps:
20+
- name: Checkout repository
21+
uses: actions/checkout@v4
22+
23+
- name: Log in to GHCR
24+
uses: docker/login-action@v3
25+
with:
26+
registry: ghcr.io
27+
username: ${{ github.actor }}
28+
password: ${{ secrets.GITHUB_TOKEN }}
29+
30+
- name: Build the Docker image
31+
run: |
32+
docker build -t ghcr.io/${{ github.repository }}:latest .
33+
34+
- name: Push the Docker image
35+
run: |
36+
docker push ghcr.io/${{ github.repository }}:latest

0 commit comments

Comments
 (0)