From 2b9cde384cfe3fa2223e9a6d4ad366180cee6e17 Mon Sep 17 00:00:00 2001 From: Tyler Perkins Date: Thu, 26 Dec 2024 17:33:28 -0500 Subject: [PATCH] Add gitea action to build image --- .drone.yml | 40 ------------------------------------ .gitea/workflows/on-tag.yaml | 29 ++++++++++++++++++++++++++ README.md | 2 +- 3 files changed, 30 insertions(+), 41 deletions(-) delete mode 100644 .drone.yml create mode 100644 .gitea/workflows/on-tag.yaml diff --git a/.drone.yml b/.drone.yml deleted file mode 100644 index 21361dc..0000000 --- a/.drone.yml +++ /dev/null @@ -1,40 +0,0 @@ -kind: pipeline -type: docker -name: build-container - -steps: -- name: build-and-push - image: plugins/docker - settings: - repo: git.clortox.com/infrastructure/filebrowser - registry: git.clortox.com - username: - from_secret: gitea_docker_username - password: - from_secret: gitea_docker_password - tags: - - latest - - ${DRONE_TAG} - when: - event: - - tag - -- name: notify - image: clortox/drone-ntfy - settings: - URL: https://ntfy.clortox.com - USERNAME: drone - PASSWORD: - from_secret: ntfy_password - TOPIC: drone-builds - MESSAGE: Filebrowser ${DRONE_TAG} has compiled! - CLICK: https://drone.clortox.com/Infrastructure/filebrowser - TITLE: Filebrowser - when: - event: - - tag - - -trigger: - event: - - tag diff --git a/.gitea/workflows/on-tag.yaml b/.gitea/workflows/on-tag.yaml new file mode 100644 index 0000000..2d77752 --- /dev/null +++ b/.gitea/workflows/on-tag.yaml @@ -0,0 +1,29 @@ +name: Build and push + +on: + push: + tags: + - '*' + +jobs: + build-and-push: + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v3 + + - name: Log in to container registry + uses: docker/login-action@v2 + with: + registry: git.clortox.com + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_PASSWORD }} + + - name: Build and push Docker image + uses: docker/build-push-action@v4 + with: + context: . + push: true + tags: | + git.clortox.com/infrastructure/filebrowser:latest + git.clortox.com/infrastructure/filebrowser:${{ github.ref_name }} diff --git a/README.md b/README.md index b1ea6ed..4838885 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # Filebrowser ![Gitea Release](https://img.shields.io/gitea/v/release/Infrastructure/Filebrowser?gitea_url=https%3A%2F%2Fgit.clortox.com) -[![Build Status](https://drone.clortox.com/api/badges/Infrastructure/Filebrowser/status.svg)](https://drone.clortox.com/Infrastructure/Filebrowser) +![Build Status](https://git.clortox.com/Infrastructure/Filebrowser/actions/workflows/on-tag/badge.svg?branch=master) An specfic contianer build of [filebrowser](https://filebrowser.org) that allows for some configuration using environment variables. Intended to be used as a sidecar for kubernetes pods.