diff --git a/.gitea/ISSUE_TEMPLATE.md b/.gitea/ISSUE_TEMPLATE.md new file mode 100644 index 0000000..29f248a --- /dev/null +++ b/.gitea/ISSUE_TEMPLATE.md @@ -0,0 +1,13 @@ +--- +name: 'Feature' +about: 'This is a feature template' +title: '[TEST] ' +ref: 'main' +assignees: [] +labels: + - feature +--- + +```info +duration: [x] +``` diff --git a/.gitea/workflows/go.yml b/.gitea/workflows/go.yml new file mode 100644 index 0000000..d7df59a --- /dev/null +++ b/.gitea/workflows/go.yml @@ -0,0 +1,32 @@ +# This workflow will build a golang project +# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-go + +name: Go + +on: + push: + branches: ["main", "dev"] + pull_request: + branches: ["main", "dev"] + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - name: "Install webp" + run: | + sudo apt-get update + sudo apt-get install libwebp-dev + + - name: Set up Go + uses: actions/setup-go@v4 + with: + go-version: "1.24.5" + + - name: Build + run: go build -v ./... + + - name: Test + run: go test -v ./... diff --git a/.gitea/workflows/release.yml b/.gitea/workflows/release.yml new file mode 100644 index 0000000..3ffc82f --- /dev/null +++ b/.gitea/workflows/release.yml @@ -0,0 +1,40 @@ +name: Release + +on: + push: + branches: ["main"] + tags: + - "v*" + +jobs: + publish: + runs-on: ubuntu-latest + steps: + - uses: https://github.com/actions/checkout@v4 + - name: Set up Docker Buildx + uses: https://github.com/docker/setup-buildx-action@v3 + with: + config-inline: | + [registry."git.schreifuchs.ch"] + http = true + insecure = true + - name: Create Release + uses: actions/create-release@latest + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token + with: + tag_name: ${{ github.ref }} + release_name: Release ${{ github.ref }} + body: new release + draft: false + prerelease: false + + - name: login + run: docker login -u schreifuchs -p ${{ secrets.REGISTRY_TOKEN }} git.schreifuchs.ch + - name: Build and push Docker image + uses: https://github.com/docker/build-push-action@v5 + with: + context: . + file: ./Dockerfile + push: true + tags: "git.schreifuchs.ch/lou-taylor/accounting:${{ github.ref_name }},git.schreifuchs.ch/lou-taylor/accounting:latest"