Skip to content

Commit

Permalink
Fix 0.0.19 build errors and add a github action to test release on PR…
Browse files Browse the repository at this point in the history
…s to main
  • Loading branch information
alexlovelltroy committed Jan 29, 2024
1 parent 4a21559 commit fef00cd
Show file tree
Hide file tree
Showing 4 changed files with 48 additions and 3 deletions.
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

0 comments on commit fef00cd

Please sign in to comment.