From 93e76876dd1cc161413ccfbbbd13e292e76b47de Mon Sep 17 00:00:00 2001 From: Joe Monk Date: Fri, 24 Jan 2025 17:47:09 +0000 Subject: [PATCH] Add a build step and bump the image --- .gitea/workflows/deploy.yaml | 38 ++++++++++++++++++++++++++++++++++++ Dockerfile | 4 ++-- readme.md | 7 ------- 3 files changed, 40 insertions(+), 9 deletions(-) create mode 100644 .gitea/workflows/deploy.yaml diff --git a/.gitea/workflows/deploy.yaml b/.gitea/workflows/deploy.yaml new file mode 100644 index 0000000..b7349c1 --- /dev/null +++ b/.gitea/workflows/deploy.yaml @@ -0,0 +1,38 @@ +name: Build and deploy +run-name: Build and deploy +on: + push: + branches: + - main + +jobs: + deploy: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + github-server-url: 'https://gitea.home.joemonk.co.uk' + + - name: Set up docker + run: 'curl -fsSL https://get.docker.com | sh' + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + + - name: Login to private registry + uses: docker/login-action@v3 + with: + registry: 'gitea.home.joemonk.co.uk/${{ github.repository }}' + username: ${{ secrets.REGISTRY_USERNAME }} + password: ${{ secrets.REGISTRY_PASSWORD }} + + - name: Build and push + uses: docker/build-push-action@v6 + with: + context: . + push: true + tags: | + gitea.home.joemonk.co.uk/${{ gitea.repository }}:latest + gitea.home.joemonk.co.uk/${{ gitea.repository }}:${{ gitea.sha }} + gitea.home.joemonk.co.uk/${{ gitea.repository }}:${{ gitea.run_number }} \ No newline at end of file diff --git a/Dockerfile b/Dockerfile index 069d87a..ee04016 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,8 +1,8 @@ -FROM quay.io/kairos/debian:bookworm-standard-amd64-generic-v3.1.2-k3sv1.30.4-k3s1 +FROM quay.io/kairos/debian:bookworm-standard-amd64-generic-v3.2.4-k3sv1.31.3-k3s1 RUN apt update && apt -y install \ samba \ && rm -rf /var/lib/apt/lists/* -RUN export VERSION="my-version" +RUN export VERSION="kairos-custom" RUN envsubst '${VERSION}'