Skip to content

Commit

Permalink
chore(ci): redesigned action to update images for all supported tags
Browse files Browse the repository at this point in the history
  • Loading branch information
orenlab committed Jan 13, 2025
1 parent 9873e61 commit 8902390
Showing 1 changed file with 46 additions and 0 deletions.
46 changes: 46 additions & 0 deletions .github/workflows/rebuild_supported_tags.yml
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' || '' }}

0 comments on commit 8902390

Please sign in to comment.