Initial commit
All checks were successful
build-and-pudh / docker (push) Successful in 32s

This commit is contained in:
dobiadi
2024-10-24 12:27:17 +02:00
commit d4acdc6caf
3 changed files with 62 additions and 0 deletions

View File

@@ -0,0 +1,40 @@
name: build-and-pudh
on:
push:
branches:
- master
pull_request:
jobs:
docker:
runs-on: ubuntu-latest
steps:
- name: Get registry name
id: registry
run: echo "registry=$(echo $GITHUB_SERVER_URL | grep -oP 'https://\K\S+')" >> "$GITHUB_OUTPUT"
- name: Checkout
uses: actions/checkout@v4
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ steps.registry.outputs.registry }}/${{ gitea.repository }}
tags: |
type=sha,format=short,prefix=
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to Docker Registry
uses: docker/login-action@v3
with:
registry: ${{ steps.registry.outputs.registry }}
username: ${{ gitea.actor }}
password: ${{ secrets.CI_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v6
with:
platforms: linux/amd64
push: true
tags: ${{ steps.meta.outputs.tags }}

3
Dockerfile Normal file
View File

@@ -0,0 +1,3 @@
FROM docker.io/library/nginx:1.27-alpine
COPY index.html /usr/share/nginx/html/

19
index.html Normal file
View File

@@ -0,0 +1,19 @@
<!doctype html>
<html>
<head>
<title>Demo app!</title>
<style>
html {
color-scheme: light dark;
}
body {
width: 35em;
margin: 0 auto;
font-family: Tahoma, Verdana, Arial, sans-serif;
}
</style>
</head>
<body>
<h1>Welcome to nginx!</h1>
</body>
</html>