From b9893e76f36b16a851a0e58a33b24dcd4624f0b4 Mon Sep 17 00:00:00 2001 From: Stefan Bethke Date: Tue, 30 Jul 2024 18:57:12 +0200 Subject: [PATCH] Add Forgejo workflow --- .forgejo/workflows/image.yaml | 28 ++++++++++++++++++++++++++++ Dockerfile | 2 +- 2 files changed, 29 insertions(+), 1 deletion(-) create mode 100644 .forgejo/workflows/image.yaml diff --git a/.forgejo/workflows/image.yaml b/.forgejo/workflows/image.yaml new file mode 100644 index 0000000..df49bd8 --- /dev/null +++ b/.forgejo/workflows/image.yaml @@ -0,0 +1,28 @@ +on: + push: + branches: + - main + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: docker/metadata-action@v5 + id: metadata + with: + images: git.hamburg.ccc.de/${{ github.repository }}/hackertours + tags: | + type=raw,value=latest,enable={{is_default_branch}} + - uses: docker/login-action@v1 + with: + registry: git.hamburg.ccc.de + username: ${{ github.actor }} + password: ${{ secrets.REPO_TOKEN }} + - uses: https://github.com/int128/kaniko-action@v1 + with: + push: true + tags: ${{ steps.metadata.outputs.tags }} + labels: ${{ steps.metadata.outputs.labels }} + cache: true + cache-repository: git.hamburg.ccc.de/${{ github.repository }}/cache \ No newline at end of file diff --git a/Dockerfile b/Dockerfile index de7d867..32ea079 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM docker.io/nginx +FROM docker.io/nginx:1.26.0-bookworm RUN rm -rf /usr/share/nginx/html && mkdir -p /usr/share/nginx/html COPY public /usr/share/nginx/html \ No newline at end of file