Live video on the AT Protocol
at eli/docker-linting 67 lines 2.1 kB view raw
1name: docker-build 2 3on: 4 push: 5 6concurrency: 7 group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} 8 cancel-in-progress: true 9 10jobs: 11 docker: 12 name: docker-build 13 runs-on: ubuntu-latest 14 permissions: 15 packages: write 16 contents: read 17 18 steps: 19 - name: Set up Docker Buildx 20 uses: docker/setup-buildx-action@v2 21 22 # - name: Extract metadata (tags, labels) for Docker 23 # id: meta 24 # uses: docker/metadata-action@v5 25 # with: 26 # images: | 27 # ghcr.io/${{ github.repository }} 28 # tags: | 29 # type=sha 30 # type=ref,event=pr 31 # type=ref,event=tag 32 # type=sha,format=long 33 # type=ref,event=branch 34 # type=semver,pattern={{version}},prefix=v 35 # type=semver,pattern={{major}}.{{minor}},prefix=v 36 # type=raw,value=latest,enable={{is_default_branch}} 37 # type=raw,value=${{ github.event.pull_request.head.ref }} 38 # type=raw,value=stable,enable=${{ startsWith(github.event.ref, 'refs/tags/v') }} 39 40 # - name: Login to DockerHub 41 # uses: docker/login-action@v2 42 # with: 43 # username: ${{ secrets.CI_DOCKERHUB_USERNAME }} 44 # password: ${{ secrets.CI_DOCKERHUB_TOKEN }} 45 46 - name: Log in to the Container registry 47 uses: docker/login-action@v2 48 with: 49 registry: ghcr.io 50 username: ${{ github.actor }} 51 password: ${{ github.token }} 52 53 - name: Build and push 54 uses: docker/build-push-action@v6 55 with: 56 platforms: linux/amd64 57 provenance: mode=max 58 sbom: true 59 push: true 60 file: docker/build.Dockerfile 61 # build-args: | 62 # GIT_VERSION=${{ github.ref_type == 'tag' && github.ref_name || github.event.pull_request.head.sha || github.sha }} 63 tags: 64 ghcr.io/streamplace/streamplace:builder-${{ 65 hashFiles('docker/build.Dockerfile') }} 66 cache-from: type=gha 67 cache-to: type=gha,mode=max