Skip to content

Commit ad8eca1

Browse files
committed
Squashed commit of the following:
commit 798ca53bf66e0caf2d85873b9819fd0488c69153 Author: KangWon LEE <[email protected]> Date: Tue Feb 18 22:20:58 2025 +0900 feature : update Change Log commit 3e24106f60e4f916704fe79fd2751933d6a70fe9 Author: KangWon LEE <[email protected]> Date: Tue Feb 18 21:48:54 2025 +0900 feature : add docker image size commit 24fc5b859ff3c00b9102f8e39f6469a19181e94b Author: KangWon LEE <[email protected]> Date: Tue Feb 18 21:45:48 2025 +0900 feature : add docker shield commit 01b99fa Author: KangWon LEE <[email protected]> Date: Tue Feb 18 21:08:53 2025 +0900 Revert "fix : ghcr.io/ NAMESPACE" This reverts commit c7640fb. commit f4aa809 Author: KangWon LEE <[email protected]> Date: Tue Feb 18 21:01:27 2025 +0900 fix : ghcr.io/ NAMESPACE ref : https://docs.github.com/en/packages/working-with-a-github-packages-registry/working-with-the-container-registry#pushing-container-images commit 47b11ac Author: KangWon LEE <[email protected]> Date: Tue Feb 18 20:54:26 2025 +0900 fix : github.event.repository.name commit cd0ca84 Author: KangWon LEE <[email protected]> Date: Tue Feb 18 20:52:45 2025 +0900 fix : vars.DOCKER_USERNAME commit c1aa7e7 Author: KangWon LEE <[email protected]> Date: Tue Feb 18 20:37:17 2025 +0900 fix : env.DOCKER_USERNAME commit 7f7c957 Author: KangWon LEE <[email protected]> Date: Tue Feb 18 20:30:47 2025 +0900 fix : Docker Username commit 6c4db5b Author: KangWon LEE <[email protected]> Date: Tue Feb 18 20:04:45 2025 +0900 feature : replace id & repo with variables to avoid possible typo saw a prior case commit 1cf5459 Author: KangWon LEE <[email protected]> Date: Tue Feb 18 18:58:58 2025 +0900 fix : remove major release yaml commit 5212a22 Author: KangWon LEE <[email protected]> Date: Tue Feb 18 18:41:06 2025 +0900 Revert "feature : publish docker image when pushed for now" This reverts commit a49897e. commit 5b57351 Author: KangWon LEE <[email protected]> Date: Tue Feb 18 18:27:47 2025 +0900 feature : publish docker image when pushed for now commit 324ed09 Author: KangWon LEE <[email protected]> Date: Tue Feb 18 18:27:13 2025 +0900 feature : add docker-publish.yaml instead of building the docker image everytime used, save the docker image to the DockerHub
1 parent b67af94 commit ad8eca1

File tree

4 files changed

+86
-23
lines changed

4 files changed

+86
-23
lines changed
Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
name: Docker Publish
2+
3+
on:
4+
release:
5+
types: [created]
6+
7+
jobs:
8+
build-push:
9+
runs-on: ubuntu-latest
10+
11+
steps:
12+
- name: Checkout
13+
uses: actions/checkout@v4
14+
15+
- name: Prepare
16+
id: prep
17+
run: |
18+
DOCKERHUB_IMAGE=${{ vars.DOCKER_USERNAME }}/${{ github.event.repository.name }}
19+
GHCR_IMAGE=ghcr.io/${{ github.repository }}
20+
VERSION=${GITHUB_REF#refs/tags/v}
21+
MINOR=${VERSION%.*}
22+
MAJOR=${VERSION%%.*}
23+
TAGS="${DOCKERHUB_IMAGE}:${MAJOR},${DOCKERHUB_IMAGE}:${MINOR}"
24+
TAGS="${TAGS},${DOCKERHUB_IMAGE}:${VERSION},${DOCKERHUB_IMAGE}:latest"
25+
TAGS="${TAGS},${GHCR_IMAGE}:${MAJOR},${GHCR_IMAGE}:${MINOR}"
26+
TAGS="${TAGS},${GHCR_IMAGE}:${VERSION},${GHCR_IMAGE}:latest"
27+
echo "tags=${TAGS}" >> $GITHUB_OUTPUT
28+
echo "version=${VERSION}" >> $GITHUB_OUTPUT
29+
echo "dockerhub_image=${DOCKERHUB_IMAGE}" >> $GITHUB_OUTPUT
30+
echo "ghcr_image=${GHCR_IMAGE}" >> $GITHUB_OUTPUT
31+
32+
- name: Set up QEMU
33+
uses: docker/setup-qemu-action@v3
34+
with:
35+
platforms: all
36+
37+
- name: Set up Docker Buildx
38+
id: buildx
39+
uses: docker/setup-buildx-action@v3
40+
41+
- name: Login to DockerHub
42+
uses: docker/login-action@v3
43+
with:
44+
username: ${{ vars.DOCKER_USERNAME }}
45+
password: ${{ secrets.DOCKER_PASSWORD }}
46+
47+
- name: Login to Github Container Registry
48+
uses: docker/login-action@v3
49+
with:
50+
registry: ghcr.io
51+
username: ${{ github.repository_owner }}
52+
password: ${{ secrets.GITHUB_TOKEN }}
53+
54+
- name: Build and push
55+
uses: docker/build-push-action@v6
56+
with:
57+
builder: ${{ steps.buildx.outputs.name }}
58+
context: .
59+
file: ./Dockerfile
60+
platforms: linux/amd64,linux/arm64,linux/386,linux/arm/v7,linux/arm/v6
61+
push: true
62+
tags: ${{ steps.prep.outputs.tags }}
63+
labels: org.opencontainers.image.version=${{ steps.prep.outputs.version }}

.github/workflows/major-release-num.yml

Lines changed: 0 additions & 23 deletions
This file was deleted.

CHANGELOG.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,28 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
88

99
### Added
1010

11+
12+
### Changed
13+
14+
15+
### Deprecated
16+
17+
18+
### Removed
19+
20+
21+
### Fixed
22+
23+
## [v0.1.7] - 2025-02-18
24+
25+
### Added
26+
1127
- Added the ability to specify the Gemini model when using the AI Tutor GitHub Action. A new `model` input has been added to the action, allowing users to select different Gemini models. The default model remains `gemini-2.0-flash` for backward compatibility.
1228
- Added Norwegian support
29+
- Added Docker Image Build & Push to the CI/CD pipeline. Please use the following line
30+
```yaml
31+
uses: docker://ghcr.io/github-id/action-name:tag
32+
```
1333
1434
### Changed
1535
@@ -19,6 +39,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1939
2040
### Removed
2141
42+
- Removed major version number yaml seemingly not working in the action.
2243
2344
### Fixed
2445

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
[![Build Status](https://github.com/kangwonlee/gemini-python-tutor/workflows/build/badge.svg)](https://github.com/kangwonlee/gemini-python-tutor/actions)
22
[![GitHub release](https://img.shields.io/github/release/kangwonlee/gemini-python-tutor.svg)](https://github.com/kangwonlee/gemini-python-tutor/releases)
3+
[![Docker Image Version (latest by date)](https://img.shields.io/docker/v/beachgoer/gemini-python-tutor?label=Docker%20Hub&logo=docker)](https://hub.docker.com/r/beachgoer/gemini-python-tutor)
4+
[![Docker Image Size (latest by date)](https://img.shields.io/docker/image-size/beachgoer/gemini-python-tutor?logo=docker)](https://hub.docker.com/r/beachgoer/gemini-python-tutor)
35

46
# AI Python Code Tutor (Gemini)
57

0 commit comments

Comments
 (0)