Skip to content

Commit

Permalink
Merge pull request #6 from marcopollivier/feat/backend
Browse files Browse the repository at this point in the history
Create basic backend
  • Loading branch information
caioeverest authored Jan 18, 2024
2 parents d8f79b3 + ffdc3e4 commit 36e64aa
Show file tree
Hide file tree
Showing 56 changed files with 2,064 additions and 0 deletions.
25 changes: 25 additions & 0 deletions .github/workflows/on_merge_main.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: On merge with main

on:
push:
branches:
- 'main'
tags-ignore:
- '*.*'

env:
GIT_USERNAME: ${{ github.actor }}
GIT_EMAIL: "[email protected]"
TODOCHECK_AUTH_TOKEN: ${{ secrets.GHA_PAT }}

jobs:
create-issues:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Download todocheck
run: |
curl -fsSL "https://github.com/preslavmihaylov/todocheck/releases/download/v0.6.1/todocheck-v0.6.1-linux-x86_64" -o todocheck
chmod +x todocheck
- name: Run todocheck
run: ./todocheck --basepath .
54 changes: 54 additions & 0 deletions .github/workflows/on_push.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: on push

on:
push:
branches:
- '**'
tags-ignore:
- '*.*'
paths-ignore:
- README.md
- .github/*
- docs/*

env:
GIT_USERNAME: '${{ github.actor }}'
GIT_EMAIL: [email protected]
PA_TOKEN: '${{ secrets.GHA_PAT }}'

jobs:
lint:
permissions:
contents: read
id-token: write
name: lint
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
with:
go-version: 1.21.5
cache: false
- uses: actions/checkout@v3

- name: golangci-lint
uses: golangci/golangci-lint-action@v3
with:
version: latest
install-mode: goinstall
skip-pkg-cache: true

test:
permissions:
contents: read
id-token: write
runs-on: ubuntu-latest
timeout-minutes: 20

steps:
- uses: actions/checkout@v3
- name: Set up Go
uses: actions/[email protected]
with:
go-version: 1.21.5
- name: Test
run: go test ./...
28 changes: 28 additions & 0 deletions .github/workflows/on_release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: On release push

on:
push:
tags:
- "v*"

env:
ENVIRONMENT: "prod"
GIT_USERNAME: ${{ github.actor }}
GIT_EMAIL: "[email protected]"
PA_TOKEN: ${{ secrets.GHA_PAT }}
HEROKU_API_KEY: ${{ secrets.HEROKU_API_KEY }}

jobs:
build-and-push:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set output
id: vars
run: echo "tag=${GITHUB_REF#refs/*/}" >> $GITHUB_OUTPUT
- name: Login to Heroku Container registry
run: heroku container:login
- name: Build and push
run: heroku container:push -a ${{ secrets.HEROKU_APP_NAME }} web --arg VERSION=${{ steps.vars.outputs.tag }}
- name: Release
run: heroku container:release -a ${{ secrets.HEROKU_APP_NAME }} web
Loading

0 comments on commit 36e64aa

Please sign in to comment.