Update actions/checkout action to v6 #149
Workflow file for this run
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: CI | |
| on: | |
| push: | |
| branches: [ main ] | |
| pull_request: | |
| branches: [ main ] | |
| jobs: | |
| buildx: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - name: Set env | |
| run: echo "TAG=$(echo $(date +%Y.%m.%d))" >> $GITHUB_ENV | |
| - name: Docker Login to Docker Hub | |
| if: ${{ github.event_name == 'push' }} | |
| uses: docker/login-action@v3.6.0 | |
| with: | |
| registry: docker.io | |
| username: ${{ secrets.DOCKERHUB_USERNAME }} | |
| password: ${{ secrets.DOCKERHUB_TOKEN }} | |
| - name: Docker Login to GHCR | |
| if: ${{ github.event_name == 'push' }} | |
| uses: docker/login-action@v3.6.0 | |
| with: | |
| registry: ghcr.io | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Set up QEMU | |
| uses: docker/setup-qemu-action@v3.7.0 | |
| - name: Set up Docker Buildx | |
| id: buildx | |
| uses: docker/setup-buildx-action@v3.11.1 | |
| - name: Build and Push to Docker Hub and GHCR | |
| uses: docker/build-push-action@v6 | |
| with: | |
| context: . | |
| file: ./Dockerfile | |
| platforms: linux/amd64,linux/arm64 | |
| push: ${{ github.event_name == 'push' }} | |
| tags: | | |
| sholdee/caddy-proxy-cloudflare:latest | |
| sholdee/caddy-proxy-cloudflare:${{ env.TAG }} | |
| ghcr.io/${{ github.repository_owner }}/caddy-proxy-cloudflare:latest | |
| ghcr.io/${{ github.repository_owner }}/caddy-proxy-cloudflare:${{ env.TAG }} | |
| - name: Create GitHub Release | |
| if: ${{ github.event_name == 'push' }} | |
| uses: ncipollo/release-action@v1.20.0 | |
| with: | |
| tag: ${{ env.TAG }} | |
| allowUpdates: true | |
| makeLatest: true |