Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create basic backend #6

Merged
merged 9 commits into from
Jan 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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