2023-10-09 22:56:07 +02:00
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- main
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
docker-image:
|
|
|
|
runs-on: docker
|
|
|
|
steps:
|
|
|
|
- name: Install dependencies
|
|
|
|
run: |
|
2023-10-09 23:19:06 +02:00
|
|
|
echo deb http://deb.debian.org/debian bullseye-backports main | tee /etc/apt/sources.list.d/backports.list
|
|
|
|
apt-get update -qq
|
2023-10-09 22:56:07 +02:00
|
|
|
apt-get install -y git
|
2023-10-09 23:19:06 +02:00
|
|
|
DEBIAN_FRONTEND=noninteractive apt-get install --no-install-recommends -qq -y -t bullseye-backports docker.io
|
2023-10-09 22:56:07 +02:00
|
|
|
|
2023-10-19 22:12:33 +02:00
|
|
|
- name: Checkout the sourcecode
|
2023-10-09 22:56:07 +02:00
|
|
|
uses: actions/checkout@v3
|
|
|
|
|
2023-10-19 22:29:56 +02:00
|
|
|
- name: Set up Docker build environment (rootless)
|
2023-10-09 22:56:07 +02:00
|
|
|
uses: docker/setup-buildx-action@v3
|
2023-10-19 22:43:10 +02:00
|
|
|
with:
|
|
|
|
driver-opts: |
|
|
|
|
image=moby/buildkit:v0.12.1-rootless
|
|
|
|
network=host
|
2023-10-09 22:56:07 +02:00
|
|
|
|
|
|
|
- name: Login to forgejo docker registry
|
|
|
|
uses: docker/login-action@v3
|
|
|
|
with:
|
2023-10-09 22:59:46 +02:00
|
|
|
registry: git.okoyono.de
|
2023-10-09 22:56:07 +02:00
|
|
|
username: ${{ secrets.DOCKER_REGISTRY_USERNAME }}
|
|
|
|
password: ${{ secrets.DOCKER_REGISTRY_PASSWORD }}
|
|
|
|
|
|
|
|
- name: Build and push the docker image
|
|
|
|
uses: docker/build-push-action@v5
|
|
|
|
with:
|
|
|
|
push: true
|
|
|
|
tags: git.okoyono.de/okoyono-intern/okospaceapi:latest
|