From d4acdc6caf4467fa1a31780ff561658745962f5d Mon Sep 17 00:00:00 2001 From: dobiadi Date: Thu, 24 Oct 2024 12:27:17 +0200 Subject: [PATCH] Initial commit --- .gitea/workflows/build-and-push.yaml | 40 ++++++++++++++++++++++++++++ Dockerfile | 3 +++ index.html | 19 +++++++++++++ 3 files changed, 62 insertions(+) create mode 100644 .gitea/workflows/build-and-push.yaml create mode 100644 Dockerfile create mode 100644 index.html diff --git a/.gitea/workflows/build-and-push.yaml b/.gitea/workflows/build-and-push.yaml new file mode 100644 index 0000000..55d9f16 --- /dev/null +++ b/.gitea/workflows/build-and-push.yaml @@ -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 }} diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..ae41c03 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,3 @@ +FROM docker.io/library/nginx:1.27-alpine + +COPY index.html /usr/share/nginx/html/ diff --git a/index.html b/index.html new file mode 100644 index 0000000..ee57d2c --- /dev/null +++ b/index.html @@ -0,0 +1,19 @@ + + + + Demo app! + + + +

Welcome to nginx!

+ +