Skip to content

Commit

Permalink
GitHub Action updated.
Browse files Browse the repository at this point in the history
  • Loading branch information
s-nagaev committed Feb 8, 2024
1 parent 22517bb commit 7af08d2
Show file tree
Hide file tree
Showing 6 changed files with 541 additions and 3,059 deletions.
3 changes: 0 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
name: Build

on:
schedule:
- cron: "0 0 * * *"
push:
tags:
- "v*.*.*"
Expand All @@ -28,7 +26,6 @@ jobs:
pysergio/hiroshi
# generate Docker tags based on the following events/attributes
tags: |
type=schedule
type=ref,event=branch
type=ref,event=pr
type=semver,pattern={{version}}
Expand Down
59 changes: 59 additions & 0 deletions .github/workflows/update.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: Update Dependencies and Build Docker Image

on:
schedule:
- cron: '0 11 * * *'

jobs:
update-and-build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- name: Set up QEMU
uses: docker/setup-qemu-action@v2

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2

- name: Login to Docker Hub
uses: docker/login-action@v2
with:
username: '${{ secrets.DOCKERHUB_USERNAME }}'
password: '${{ secrets.DOCKERHUB_TOKEN }}'

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.11'

- name: Install poetry
run: pipx install poetry==1.7.0

- name: Update dependencies
run: |
poetry update
poetry export -f requirements.txt --output requirements.txt --without-hashes
- name: Docker meta
id: meta
uses: docker/metadata-action@v5
with:
images: |
pysergio/hiroshi
tags: |
type=schedule,pattern=latest
- name: Build and push
uses: docker/build-push-action@v3
with:
context: .
file: Dockerfile
platforms: 'linux/amd64,linux/arm64'
push: true
tags: '${{ steps.meta.outputs.tags }}'
labels: '${{ steps.meta.outputs.labels }}'
cache-from: 'type=registry,ref=pysergio/hiroshi:buildcache'
cache-to: 'type=registry,ref=pysergio/hiroshi:buildcache,mode=max'

11 changes: 11 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,17 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [0.1.2] - 2024-02-08

### Added
-
- GitHub Action for building an artifact on a schedule with an updated version of g4f

### Changed

- Dependencies updated.


## [0.1.1] - 2023-11-24

### Changed
Expand Down
Loading

0 comments on commit 7af08d2

Please sign in to comment.