add docker builder using kubernetes natively
This commit is contained in:
31
infrastructure/gitea/README.md
Normal file
31
infrastructure/gitea/README.md
Normal file
@@ -0,0 +1,31 @@
|
||||
# Using gitea actions
|
||||
The actions deployment allows to use gitea actions from repositories within this instance.
|
||||
|
||||
### Building docker images
|
||||
Docker builds use the kubernetes runner to build the images. For this to work, the pipeline needs to be able to access the kube-api. A service-account is created for this purpose.
|
||||
|
||||
To use the correct docker builder use the following action
|
||||
```yaml
|
||||
...
|
||||
|
||||
- name: Create Kubeconfig
|
||||
run: |
|
||||
mkdir $HOME/.kube
|
||||
echo "${{ secrets.BUILDX_KUBECONFIG }}" > $HOME/.kube/config
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v3
|
||||
with:
|
||||
driver: kubernetes
|
||||
driver-opts: |
|
||||
namespace=act-runner
|
||||
qemu.install=true
|
||||
|
||||
...
|
||||
|
||||
- name: Build and push
|
||||
uses: docker/build-push-action@v5
|
||||
with:
|
||||
context: .
|
||||
<other config>
|
||||
```
|
Reference in New Issue
Block a user