Compare commits

...

4 Commits

Author SHA1 Message Date
acfd6fc6c6 Feat: use bundled gitea action
All checks were successful
Build and push image / release-image (push) Successful in 2m37s
2025-04-23 11:35:20 +08:00
4da2c292d7 Fix: remove github attest 2024-11-26 07:57:01 +00:00
32cc18e0ba Fix: add rootca 2024-11-26 07:37:16 +00:00
ebd38fd9cc Feat: GitHub Action 2024-11-26 07:35:04 +00:00
4 changed files with 48 additions and 52 deletions

View File

@@ -1,51 +1,13 @@
name: Release name: Build and push image
on: [push] on: [push]
jobs: jobs:
release-image: release-image:
runs-on: imgbuilder runs-on: imgbuilder
env:
CONTAINER_REGISTRY: gitea.konchin.com
GITEA_TAG: latest
steps: steps:
- name: Checkout - name: Build and push image
uses: actions/checkout@v4 uses: https://gitea.konchin.com/action/docker@main
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up rootca
run: |
echo "${{ vars.ROOTCA }}" | tee rootca.pem
- name: Set up Docker BuildX
uses: docker/setup-buildx-action@v3
with: with:
config-inline: | registry-certificate: ${{ vars.ROOTCA }}
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 }} username: ${{ secrets.REGISTRY_USERNAME }}
password: ${{ secrets.REGISTRY_PASSWORD }} 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 }}

43
.github/workflows/image.yml vendored Normal file
View File

@@ -0,0 +1,43 @@
name: Build image
on: [push]
jobs:
push_to_registries:
name: Push Container image to multiple registries
runs-on: ubuntu-latest
permissions:
packages: write
contents: read
attestations: write
id-token: write
steps:
- name: Check out the repo
uses: actions/checkout@v4
- name: Log in to the Container registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract metadata (tags, labels) for Container
id: meta
uses: docker/metadata-action@v5
with:
images: |
ghcr.io/${{ github.repository }}
- name: Set up rootca
run: |
echo "${{ vars.ROOTCA }}" | tee rootca.pem
- name: Build and push Container images
id: push
uses: docker/build-push-action@v6
with:
context: .
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}

View File

@@ -1,6 +1,6 @@
FROM archlinux:base-devel FROM archlinux:base-devel
ADD rootca.pem /root ADD rootca.pem /root/
RUN trust anchor /root/rootca.pem && update-ca-trust RUN trust anchor /root/rootca.pem && update-ca-trust
RUN cat > /etc/pacman.d/mirrorlist <<'EOF' RUN cat > /etc/pacman.d/mirrorlist <<'EOF'

View File

@@ -1,10 +1 @@
# Image - archmakepkg # Image - archmakepkg
## Environment variables
- MINIO_HOST
- MINIO_PORT
- MINIO_ACCESSKEY
- MINIO_SECRETKEY
- MINIO_BUCKET
- REPO_NAME