-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(ci): redesigned action to update images for all supported tags
- Loading branch information
Showing
1 changed file
with
46 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
name: CI Rebuild Specific Tags | ||
|
||
on: | ||
schedule: | ||
- cron: '0 12 * * 1' # Every Monday at 12:00 UTC (17:00 Yekaterinburg) | ||
workflow_dispatch: # Allow manual trigger | ||
|
||
jobs: | ||
docker: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
tag: | ||
- 0.2.0 | ||
- 0.2.1 # This will also be tagged as latest | ||
include: | ||
- tag: 0.2.0 | ||
is_latest: false | ||
context: https://github.com/orenlab/pytmbot.git#0.2.0 | ||
- tag: 0.2.1 | ||
is_latest: true | ||
context: https://github.com/orenlab/pytmbot.git#0.2.1 | ||
|
||
steps: | ||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v3 | ||
|
||
- name: Login to Docker Hub | ||
uses: docker/login-action@v3 | ||
with: | ||
username: ${{ secrets.DOCKER_USERNAME }} | ||
password: ${{ secrets.DOCKER_PASSWORD }} | ||
|
||
- name: Build and push Docker image | ||
uses: docker/build-push-action@v5 | ||
with: | ||
context: ${{ matrix.context }} | ||
platforms: linux/amd64,linux/arm64 | ||
sbom: true | ||
provenance: true | ||
file: Dockerfile | ||
push: true | ||
target: production | ||
tags: | | ||
orenlab/pytmbot:${{ matrix.tag }} | ||
${{ matrix.is_latest && 'orenlab/pytmbot:latest' || '' }} |