update
This commit is contained in:
parent
2088671dc7
commit
9eaeabbcb3
@ -1,11 +1,67 @@
|
|||||||
name: Build Docker Container
|
# Inspired by:
|
||||||
run-name: ${{ gitea.actor }} is building container
|
# https://blog.gitea.com/creating-go-actions/
|
||||||
on: [push]
|
# https://gitea.com/Zettat123/test-simple-go-action/src/branch/main/.gitea/workflows/call-username.yml
|
||||||
|
# https://gitea.com/actions/release-action
|
||||||
|
# https://gitea.com/gitea/runner-images
|
||||||
|
# https://github.com/vegardit/docker-gitea-act-runner
|
||||||
|
# https://github.com/catthehacker/docker_images
|
||||||
|
#
|
||||||
|
---
|
||||||
|
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json
|
||||||
|
name: build-image
|
||||||
|
run-name: ${{ gitea.actor }} is testing out Gitea Actions 🚀 🚀 🚀
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: ["main"]
|
||||||
|
paths:
|
||||||
|
- .gitea/workflows/build-image.yaml
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
Build-Container-Image:
|
build-image:
|
||||||
|
name: build-image
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
container:
|
||||||
|
# image: ghcr.io/catthehacker/ubuntu:act-latest
|
||||||
|
# image: gitea/runner-images:ubuntu-latest
|
||||||
|
image: ghcr.io/catthehacker/ubuntu:act-latest
|
||||||
|
# credentials:
|
||||||
|
# username: ${{ gitea.actor }}
|
||||||
|
# password: ${{ secrets.GA_TOKEN }}
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Install QEMU
|
||||||
|
run: |
|
||||||
|
sudo apt-get update
|
||||||
|
sudo apt-get install -y qemu-user-static
|
||||||
|
#
|
||||||
|
# https://github.com/docker/metadata-action
|
||||||
|
#
|
||||||
|
- name: Docker meta
|
||||||
|
id: meta
|
||||||
|
uses: docker/metadata-action@v5
|
||||||
|
with:
|
||||||
|
images: |
|
||||||
|
gitea.example.com/xyz/alpine
|
||||||
|
tags: |
|
||||||
|
type=schedule,pattern={{date 'YYYYMMDDHHMM'}}
|
||||||
|
type=semver,pattern={{version}}
|
||||||
|
type=semver,pattern={{major}}.{{minor}}
|
||||||
|
type=semver,pattern={{major}}
|
||||||
|
type=sha
|
||||||
|
- name: Set up Docker Context for Buildx
|
||||||
|
id: buildx-context
|
||||||
|
run: |
|
||||||
|
export DOCKER_HOST=tcp://docker:2376/
|
||||||
|
export DOCKER_TLS_CERTDIR="/certs"
|
||||||
|
export DOCKER_TLS_VERIFY=1
|
||||||
|
export DOCKER_CERT_PATH="/certs/client"
|
||||||
|
docker context create builders
|
||||||
|
# https://github.com/docker/setup-buildx-action
|
||||||
|
# https://docs.docker.com/engine/reference/commandline/cli/#environment-variables
|
||||||
- name: Setup Docker Buildx
|
- name: Setup Docker Buildx
|
||||||
id: buildx
|
id: buildx
|
||||||
uses: docker/setup-buildx-action@v3
|
uses: docker/setup-buildx-action@v3
|
||||||
@ -15,5 +71,5 @@ jobs:
|
|||||||
env:
|
env:
|
||||||
DOCKER_HOST: "tcp://docker:2376/"
|
DOCKER_HOST: "tcp://docker:2376/"
|
||||||
DOCKER_TLS_CERTDIR: "/certs"
|
DOCKER_TLS_CERTDIR: "/certs"
|
||||||
DOCKER_TLS_VERIFY: 0
|
DOCKER_TLS_VERIFY: 1
|
||||||
DOCKER_CERT_PATH: "/certs/client"
|
DOCKER_CERT_PATH: "/certs/client"
|
Loading…
x
Reference in New Issue
Block a user