init comit
Some checks failed
Build and Push Docker Image to Gitea Registry / build-and-push (push) Failing after 3s
Some checks failed
Build and Push Docker Image to Gitea Registry / build-and-push (push) Failing after 3s
This commit is contained in:
27
.gitea/workflows/build-docker.yaml
Normal file
27
.gitea/workflows/build-docker.yaml
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
name: Build and Push Docker Image to Gitea Registry
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build-and-push:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
# Checkout the repository
|
||||||
|
- name: Checkout Code
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
|
# Log in to Gitea Registry using Personal Access Token
|
||||||
|
- name: Log in to Gitea Registry
|
||||||
|
run: echo "${{ secrets.REGISTRY_PASSWORD }}" | docker login ${{ secrets.REGISTRY_URL }} -u ${{ secrets.USERNAME }} --password-stdin
|
||||||
|
|
||||||
|
# Build Docker Image
|
||||||
|
- name: Build Docker Image
|
||||||
|
run: docker build -t ${{ secrets.REGISTRY_URL }}/${{ secrets.REPOSITORY }}/my-linktree:latest .
|
||||||
|
|
||||||
|
# Push Docker Image to Gitea Registry
|
||||||
|
- name: Push Docker Image
|
||||||
|
run: docker push ${{ secrets.REGISTRY_URL }}/${{ secrets.REPOSITORY }}/my-linktree:latest
|
||||||
14
dockerfile
Normal file
14
dockerfile
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
# Dockerfile
|
||||||
|
FROM nginx:alpine
|
||||||
|
|
||||||
|
# Kopiere die HTML-Datei in das Nginx-HTML-Verzeichnis
|
||||||
|
COPY view/index.html /usr/share/nginx/html/index.html
|
||||||
|
|
||||||
|
# Kopiere die CSS-Datei in das Nginx-HTML-Verzeichnis
|
||||||
|
COPY view/styles.css /usr/share/nginx/html/styles.css
|
||||||
|
|
||||||
|
# Exponiere den Port 80 für den Container
|
||||||
|
EXPOSE 80
|
||||||
|
|
||||||
|
# Standardbefehl zum Starten von Nginx
|
||||||
|
CMD ["nginx", "-g", "daemon off;"]
|
||||||
17
view/index.html
Normal file
17
view/index.html
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
<title>My Links</title>
|
||||||
|
<link rel="stylesheet" href="styles.css">
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div class="container">
|
||||||
|
<h1>My Links</h1>
|
||||||
|
<a class="link" href="hhttps://git.out.jafre.li/jafreli/Linktree" target="_blank">LinkTree Sourcecode</a>
|
||||||
|
<a class="link" href="https://anotherexample.com" target="_blank">Example Link 2</a>
|
||||||
|
<a class="link" href="https://yetanotherexample.com" target="_blank">Example Link 3</a>
|
||||||
|
</div>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
36
view/styles.css
Normal file
36
view/styles.css
Normal file
@@ -0,0 +1,36 @@
|
|||||||
|
body {
|
||||||
|
font-family: Arial, sans-serif;
|
||||||
|
background-color: #f4f4f9;
|
||||||
|
color: #333;
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
height: 100vh;
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
.container {
|
||||||
|
text-align: center;
|
||||||
|
max-width: 400px;
|
||||||
|
width: 90%;
|
||||||
|
background: #fff;
|
||||||
|
padding: 20px;
|
||||||
|
border-radius: 10px;
|
||||||
|
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
|
||||||
|
}
|
||||||
|
h1 {
|
||||||
|
font-size: 24px;
|
||||||
|
margin-bottom: 20px;
|
||||||
|
}
|
||||||
|
.link {
|
||||||
|
display: block;
|
||||||
|
margin: 10px 0;
|
||||||
|
padding: 10px;
|
||||||
|
background: #007BFF;
|
||||||
|
color: white;
|
||||||
|
text-decoration: none;
|
||||||
|
border-radius: 5px;
|
||||||
|
transition: background 0.3s ease;
|
||||||
|
}
|
||||||
|
.link:hover {
|
||||||
|
background: #0056b3;
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user