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

Fix 0.0.19 build errors and add a github action to test release on PRs to main #7

Merged
merged 1 commit into from
Jan 29, 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
File renamed without changes.
40 changes: 40 additions & 0 deletions .github/workflows/test-releaser.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# 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: Test with goreleaser

on:
pull_request:
branches:
- main
jobs:

build:
runs-on: ubuntu-latest

steps:
- name: Set up Go 1.21
uses: actions/setup-go@v5
with:
go-version: 1.21
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Docker Login
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Checkout
uses: actions/checkout@v4
with:
fetch-tags: 1
fetch-depth: 1
- name: Release with goreleaser
uses: goreleaser/goreleaser-action@v5
env:
GITHUB_TOKEN: ${{ github.token }}
with:
version: latest
args: --clean --snapshot
id: goreleaser-snapshot
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [0.0.19] - 2024-01-29

### Removed

- Attempting to write the config file to the filesystem isn't a good idea when running in a container. We removed that.

## [0.0.18] - 2024-01-18

### Added
Expand Down
5 changes: 2 additions & 3 deletions main.go
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
package main

import (
"crypto/rand"
"database/sql"
"encoding/hex"
"fmt"
"os"
"time"
Expand Down Expand Up @@ -51,7 +49,8 @@ func execSQL(db *sql.DB, query string) error {

func main() {

if config_file == "" {
config_file := os.Getenv("OCHAMI_CONFIG")
if config_file == "" {
log.Fatal("OCHAMI_CONFIG is required")
}
config, err := readConfig(config_file)
Expand Down
Loading