name: Build Docker Image on: push: branches: - master # Renovate will push updates as commits paths: - "Dockerfile" jobs: build-docker: runs-on: ubuntu-latest container: image: catthehacker/ubuntu:act-latest steps: # 1. Checkout repository - name: Checkout repository uses: actions/checkout@v5 with: fetch-depth: 0 # 2. Set up Docker Buildx - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 # 3. Login to your registry - name: Login to Docker registry uses: docker/login-action@v3 with: registry: git.comprofix.com username: ${{ secrets.REGISTRY_USERNAME }} password: ${{ secrets.REGISTRY_TOKEN }} # 4. Define timestamp tag - name: Set Docker image tags id: docker_tags run: | TIMESTAMP=$(date +'%Y.%m.%d-%H%M%S') echo "tags=git.comprofix.com/mmckinnon/debian-latest:latest,git.comprofix.com/mmckinnon/debian-latest:$TIMESTAMP" >> $GITHUB_ENV # 5. Build & push Docker image - name: Build and push Docker image uses: docker/build-push-action@v6 with: context: . file: ./Dockerfile push: true tags: ${{ env.tags }}