Skip to content

Commit a47aa62

Browse files
authored
GitHub Action updated. (#10)
1 parent 7df8184 commit a47aa62

File tree

6 files changed

+541
-3059
lines changed

6 files changed

+541
-3059
lines changed

.github/workflows/build.yml

-3
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
name: Build
22

33
on:
4-
schedule:
5-
- cron: "0 0 * * *"
64
push:
75
tags:
86
- "v*.*.*"
@@ -28,7 +26,6 @@ jobs:
2826
pysergio/hiroshi
2927
# generate Docker tags based on the following events/attributes
3028
tags: |
31-
type=schedule
3229
type=ref,event=branch
3330
type=ref,event=pr
3431
type=semver,pattern={{version}}

.github/workflows/update.yml

+59
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
name: Update Dependencies and Build Docker Image
2+
3+
on:
4+
schedule:
5+
- cron: '0 11 * * *'
6+
7+
jobs:
8+
update-and-build:
9+
runs-on: ubuntu-latest
10+
11+
steps:
12+
- uses: actions/checkout@v3
13+
14+
- name: Set up QEMU
15+
uses: docker/setup-qemu-action@v2
16+
17+
- name: Set up Docker Buildx
18+
uses: docker/setup-buildx-action@v2
19+
20+
- name: Login to Docker Hub
21+
uses: docker/login-action@v2
22+
with:
23+
username: '${{ secrets.DOCKERHUB_USERNAME }}'
24+
password: '${{ secrets.DOCKERHUB_TOKEN }}'
25+
26+
- name: Set up Python
27+
uses: actions/setup-python@v4
28+
with:
29+
python-version: '3.11'
30+
31+
- name: Install poetry
32+
run: pipx install poetry==1.7.0
33+
34+
- name: Update dependencies
35+
run: |
36+
poetry update
37+
poetry export -f requirements.txt --output requirements.txt --without-hashes
38+
39+
- name: Docker meta
40+
id: meta
41+
uses: docker/metadata-action@v5
42+
with:
43+
images: |
44+
pysergio/hiroshi
45+
tags: |
46+
type=schedule,pattern=latest
47+
48+
- name: Build and push
49+
uses: docker/build-push-action@v3
50+
with:
51+
context: .
52+
file: Dockerfile
53+
platforms: 'linux/amd64,linux/arm64'
54+
push: true
55+
tags: '${{ steps.meta.outputs.tags }}'
56+
labels: '${{ steps.meta.outputs.labels }}'
57+
cache-from: 'type=registry,ref=pysergio/hiroshi:buildcache'
58+
cache-to: 'type=registry,ref=pysergio/hiroshi:buildcache,mode=max'
59+

changelog.md

+11
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,17 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## [Unreleased]
99

10+
## [0.1.2] - 2024-02-08
11+
12+
### Added
13+
14+
- GitHub Action for building an artifact on a schedule with an updated version of g4f
15+
16+
### Changed
17+
18+
- Dependencies updated.
19+
20+
1021
## [0.1.1] - 2023-11-24
1122

1223
### Changed

0 commit comments

Comments
 (0)