add module entry point #22
This file contains hidden or 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
| name: Docker | |
| on: | |
| push: | |
| branches: | |
| - main | |
| tags: | |
| - 'v*' | |
| pull_request: | |
| branches: | |
| - main | |
| schedule: | |
| - cron: '0 0 * * 0' # Weekly on Sunday at midnight UTC | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| packages: write | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 0 | |
| - name: Checkout latest tag on schedule | |
| if: github.event_name == 'schedule' | |
| run: | | |
| git checkout $(git describe --tags --abbrev=0) | |
| - uses: astral-sh/setup-uv@v7 | |
| - name: Get version | |
| id: version | |
| run: | | |
| VERSION=$(uv version --short) | |
| echo "version=$VERSION" >> $GITHUB_OUTPUT | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| - name: Login to GitHub Container Registry | |
| if: github.event_name != 'pull_request' | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ghcr.io | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Build and push | |
| uses: docker/bake-action@v6 | |
| with: | |
| push: ${{ github.event_name != 'pull_request' }} | |
| set: | | |
| *.cache-from=type=gha | |
| *.cache-to=type=gha,mode=max | |
| env: | |
| VERSION: ${{ steps.version.outputs.version }} | |
| LATEST_TAG: ${{ github.ref == 'refs/heads/main' && 'main' || 'latest' }} |