This commit is contained in:
53
.gitea/workflows/image.yml
Normal file
53
.gitea/workflows/image.yml
Normal file
@@ -0,0 +1,53 @@
|
||||
name: Build image
|
||||
|
||||
on:
|
||||
push
|
||||
|
||||
jobs:
|
||||
release-image:
|
||||
runs-on: imgbuilder
|
||||
env:
|
||||
CONTAINER_REGISTRY: gitea.konchin.com
|
||||
GITEA_TAG: latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v3
|
||||
|
||||
- name: Set up Root CA
|
||||
run: |
|
||||
echo "${{ vars.ROOTCA }}" | tee rootca.pem
|
||||
|
||||
- name: Set up Docker BuildX
|
||||
uses: docker/setup-buildx-action@v3
|
||||
with:
|
||||
config-inline: |
|
||||
debug = true
|
||||
[registry."${{ env.CONTAINER_REGISTRY }}"]
|
||||
ca = ["rootca.pem"]
|
||||
|
||||
- name: Login
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
registry: ${{ env.CONTAINER_REGISTRY }}
|
||||
username: ${{ secrets.REGISTRY_USERNAME }}
|
||||
password: ${{ secrets.REGISTRY_PASSWORD }}
|
||||
|
||||
- name: Setup env
|
||||
run: |
|
||||
echo "GITEA_REPO=${GITHUB_REPOSITORY}" | tr '[:upper:]' '[:lower:]' >> $GITHUB_ENV
|
||||
echo "GITEA_REF_NAME=${GITHUB_REF_NAME}" | tr '[:upper:]' '[:lower:]' >> $GITHUB_ENV
|
||||
|
||||
- name: Build and push
|
||||
uses: docker/build-push-action@v4
|
||||
with:
|
||||
context: .
|
||||
file: ./Dockerfile
|
||||
platforms: |
|
||||
linux/amd64
|
||||
push: true
|
||||
tags: |
|
||||
${{ env.CONTAINER_REGISTRY }}/${{ env.GITEA_REPO }}:${{ env.GITEA_REF_NAME }}
|
||||
${{ env.CONTAINER_REGISTRY }}/${{ env.GITEA_REPO }}:${{ env.GITEA_TAG }}
|
||||
3
Dockerfile
Normal file
3
Dockerfile
Normal file
@@ -0,0 +1,3 @@
|
||||
FROM gcr.io/kaniko-project/executor:v1.23.2
|
||||
|
||||
ADD rootca.pem .
|
||||
Reference in New Issue
Block a user