Skip to content

Elasticsearch integration and better empty results management (#57) #202

Elasticsearch integration and better empty results management (#57)

Elasticsearch integration and better empty results management (#57) #202

Workflow file for this run

name: cryptarch
on:
- push
permissions:
contents: write
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Tests
run: |
pushd cmd/cryptarch
go mod tidy # FIXME I don't know why this is necessary.
go test
popd
go test internal/lib/*
go test pkg/storage/*
release-test:
if: ${{ !startsWith(github.ref, 'refs/tags') }} # Only run on non-tags.
needs:
- test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-go@v4
with:
go-version: stable
- uses: goreleaser/goreleaser-action@v5
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
args: release --snapshot --clean --skip=announce,publish
distribution: goreleaser
version: latest
- run: |
podman build \
--file build/package/Containerfile \
--tag spacez320/cryptarch:${{ github.sha }} \
.
release:
if: ${{ startsWith(github.ref, 'refs/tags') }} # Only run on tags.
needs:
- test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-go@v4
with:
go-version: stable
- uses: goreleaser/goreleaser-action@v5
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
args: release --clean --skip=announce
distribution: goreleaser
version: latest
- env:
DOCKER_HUB_TOKEN: ${{ secrets.DOCKER_HUB_TOKEN }}
DOCKER_HUB_USERNAME: spacez320
run: |
podman login --password $DOCKER_HUB_TOKEN --username $DOCKER_HUB_USERNAME
podman build \
--file build/package/Containerfile \
--tag spacez320/cryptarch:${{ github.sha }} \
.
podman tag \
spacez320/cryptarch:${{ github.sha }} \
spacez320/cryptarch:${{ github.ref_name }} \
spacez320/cryptarch:latest
podman push spacez320/cryptarch:${{ github.ref_name }}
podman push spacez320/cryptarch:latest