laconicd/.github/workflows/docker-image.yml
Michael facd64a14b
All test stuff (#88)
* first pass use tests/sdk-tests/run-tests.sh in github action

* - -> _

* diagnostic env step

* diagnostic env step

* diagnostic env step does not support cwd

* checkout not preserved between actions

* ./ missing

* start built containers

* missing unmarshalling of content bytes before encoding and generation of CID

* unchecked error complaint from linter

* golang linting is really picky

* utils/json test for comparing known, but deprecated method to new implementation

* try curl (retval 0) instead of wget (retval 8) for 404 that is returned

* missing curl for health check

* use feature branch for laconic-sdk... UNDO THIS LATER

* checkout is done from inside of container, rather than copied in from filesystem. checking out dev branch for now

* docker network inspect for diagnostic

* docker network inspect for diagnostic missing arg

* listen on 0.0.0.0 specfically

* trying localhost

* try host mode network

* host mode breaks name resolution of containers

* manual service check in laconicd container for diagnostic

* revert ListenAndServe

* sleep and docker logs... appears endpoint is not coming up maybe?

* disable fail_ci on codecov error... it is unstable

* turn codecov back to fail on error true to avoid invisible failure.

* Cleanup for whitespace and require.NoError in test

* new json util test, turning off codecov fails CI, and gitignore for test artifacts
2023-01-30 16:59:13 -05:00

29 lines
1.2 KiB
YAML

name: Publish on release
on:
release:
types: [published]
jobs:
build:
name: Run docker build and publish
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Run docker build
run: docker build -t cerc-io/laconicd -f Dockerfile .
- name: Get the version
id: vars
run: |
echo ::set-output name=sha::$(echo ${GITHUB_SHA:0:7})
echo ::set-output name=tag::$(echo ${GITHUB_REF#refs/tags/})
- name: Tag docker image
run: docker tag cerc-io/laconicd git.vdb.to/cerc-io/laconicd/laconicd:${{steps.vars.outputs.sha}}
- name: Tag docker image
run: docker tag git.vdb.to/cerc-io/laconicd/laconicd:${{steps.vars.outputs.sha}} git.vdb.to/cerc-io/laconicd/laconicd:${{steps.vars.outputs.tag}}
- name: Docker Login
run: echo ${{ secrets.GITEA_TOKEN }} | docker login https://git.vdb.to -u cerccicd --password-stdin
- name: Docker Push
run: docker push git.vdb.to/cerc-io/laconicd/laconicd:${{steps.vars.outputs.sha}}
- name: Docker Push TAGGED
run: docker push git.vdb.to/cerc-io/laconicd/laconicd:${{steps.vars.outputs.tag}}