1
1
mirror of https://github.com/go-gitea/gitea synced 2025-08-09 11:08:19 +00:00

Use Actions git context instead of dynamically created buildkit one (#25381) (#25383)

Backport #25381 by @techknowlogick

The [docker/build-push-action@v2
action](https://github.com/docker/build-push-action) by default ignores
the checkout created using the actions/checkout@v2 action. When you pass
a git build context to docker build, it wouldn't include the .git
directory.

By passing `context: .` to the build step then it'll use the Actions git
context which includes the git fetch from the earlier step.

Co-authored-by: techknowlogick <techknowlogick@gitea.io>
This commit is contained in:
Giteabot
2023-06-20 02:52:38 -04:00
committed by GitHub
parent 8e89eb8f43
commit 28ed763f55
2 changed files with 2 additions and 4 deletions

View File

@@ -78,12 +78,14 @@ jobs:
- name: build rootful docker image
uses: docker/build-push-action@v4
with:
context: .
platforms: linux/amd64,linux/arm64
push: true
tags: gitea/gitea:${{ steps.clean_name.outputs.branch }}
- name: build rootless docker image
uses: docker/build-push-action@v4
with:
context: .
platforms: linux/amd64,linux/arm64
push: true
file: Dockerfile.rootless