all repos — legit @ ad3e8f6b3da4e8861f63f1fa7c700829efc32f24

web frontend for git, written in go

actions: build and push docker
Anirudh Oppiliappan x@icyphox.sh
Sun, 06 Oct 2024 17:29:41 +0300
commit

ad3e8f6b3da4e8861f63f1fa7c700829efc32f24

parent

7b90e8eac224891de8dd3bc4ab37dca1b5639340

1 files changed, 52 insertions(+), 0 deletions(-)

jump to
A .github/workflows/docker.yaml

@@ -0,0 +1,52 @@

+name: build and push docker image + +on: + push: + branches: [master] + tags: ["*"] + +env: + REGISTRY: ghcr.io + IMAGE_NAME: ${{ github.repository }} + +jobs: + build: + runs-on: ubuntu-latest + permissions: + contents: read + packages: write + attestations: write + id-token: write + + steps: + - name: Check out code + uses: actions/checkout@v4 + + - name: Copy Dockerfile to . + run: cp ./contrib/Dockerfile ./Dockerfile + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + + - name: Login to GitHub Container Registry + uses: docker/login-action@v3 + with: + registry: ghcr.io + username: ${{ github.repository_owner }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Docker meta + id: meta + uses: docker/metadata-action@v5 + with: + images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} + + - name: Build and push Docker image + uses: docker/build-push-action@v6 + with: + context: . + tags: ${{ steps.meta.outputs.tags }} + labels: ${{ steps.meta.outputs.labels }} + push: true + build-args: | + BUILDKIT_INLINE_CACHE=1