diff --git a/.github/workflows/rebuild-builder.yml b/.github/workflows/rebuild-builder.yml new file mode 100644 index 0000000..5e19182 --- /dev/null +++ b/.github/workflows/rebuild-builder.yml @@ -0,0 +1,40 @@ +name: Rebuild Builder Image + +on: + workflow_dispatch: {} # For as needed rebuilds. + schedule: + - cron: "0 0 1 * *" + +jobs: + updater-base-image: + runs-on: ubuntu-latest + permissions: + packages: write + contents: read + env: + REGISTRY: git.rgst.io + IMAGE_NAME: ${{ github.repository }} + + steps: + - name: Checkout + uses: https://code.forgejo.org/actions/checkout@v4 + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + - name: Login to GitHub Container Registry + uses: docker/login-action@v3 + with: + registry: ${{ env.REGISTRY }} + username: ${{ github.actor }} + password: ${{ github.token }} + - name: Use Last Commit Date as System Timestamp + run: echo "TIMESTAMP=$(git log -1 --pretty=%ct)" >> $GITHUB_ENV + - name: Build and push image + uses: docker/build-push-action@v6 + id: push + env: + SOURCE_DATE_EPOCH: ${{ env.TIMESTAMP }} + with: + context: . + push: true + platforms: linux/amd64 + tags: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}-builder