Compare commits
4 Commits
6ec9527dbf
...
acfd6fc6c6
| Author | SHA1 | Date | |
|---|---|---|---|
|
acfd6fc6c6
|
|||
| 4da2c292d7 | |||
| 32cc18e0ba | |||
| ebd38fd9cc |
@@ -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
43
.github/workflows/image.yml
vendored
Normal 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 }}
|
||||||
@@ -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'
|
||||||
|
|||||||
Reference in New Issue
Block a user