Skip to content

Update PostgreSQL to v16 #271

Update PostgreSQL to v16

Update PostgreSQL to v16 #271

Workflow file for this run

name: Hermes CI
on: push
jobs:
build:
name: Build
runs-on: ubuntu-latest
container:
image: golang:1.21-alpine
env:
GOFLAGS: -buildvcs=false
TEST_REDIS_HOST: redis
TEST_PG_URI: pgx://postgres:postgres@postgres/hermes_test
TEST_NSQ_PUB_ADDR: nsqd:4150
TEST_NSQ_LOOKUP_ADDRS: nsqlookupd:4161
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
services:
postgres:
image: postgres:16-alpine
env:
POSTGRES_PASSWORD: postgres
POSTGRES_DB: hermes_test
nsqlookupd:
image: ghcr.io/ownmfa/nsqlookupd:v1.2.1
credentials:
username: ownmfa
password: ${{ secrets.GHCR_PAT }}
env:
LOG_LEVEL: warn
nsqd:
image: ghcr.io/ownmfa/nsqd:v1.2.1
credentials:
username: ownmfa
password: ${{ secrets.GHCR_PAT }}
env:
LOOKUP_ADDR: nsqlookupd:4160
LOG_LEVEL: warn
redis:
image: redis:7-alpine
steps:
- name: Deps
# Names are duplicated as IDs for use by Notify
id: Deps
# Add packages needed to support builds and tests
run: |
apk update && apk upgrade
apk add --no-cache make git
go version
go env
- name: Clone
id: Clone
uses: actions/checkout@v3
- name: Build_and_Test
id: Build_and_Test
run: make test
- name: Push
id: Push
# GitHub Actions does not currently support Docker within a container
run: |
apk add --no-cache docker docker-cli-buildx
docker version
docker login -u ownmfa -p ${{ secrets.GHCR_PAT }} ghcr.io
git config --global --add safe.directory /__w/hermes/hermes
TAG=$(git rev-parse --short=8 HEAD)
docker buildx create --use
#docker buildx build -f build/Dockerfile -t ghcr.io/ownmfa/hermes:${TAG} --platform linux/amd64,linux/arm64 --push .
docker buildx build -f build/Dockerfile -t ghcr.io/ownmfa/hermes:${TAG} --push .
docker buildx rm
docker logout ghcr.io
- name: Notify
uses: act10ns/slack@v2
with:
status: ${{ job.status }}
steps: ${{ toJson(steps) }}
if: always()