laconicd/.gitea/workflows/docker-image.yml
Prathamesh Musale 33b6cce362
All checks were successful
Lint / Run golangci-lint (push) Successful in 2m55s
Integration Tests / test-integration (push) Successful in 2m56s
E2E Tests / test-e2e (push) Successful in 3m35s
Unit Tests / test-unit (push) Successful in 1m12s
Additional CI workflows (#16)
Reviewed-on: deep-stack/laconic2d#16
Co-authored-by: Prathamesh Musale <prathamesh.musale0@gmail.com>
Co-committed-by: Prathamesh Musale <prathamesh.musale0@gmail.com>
2024-03-07 09:11:53 +00: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/laconic2d -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/laconic2d git.vdb.to/cerc-io/laconic2d/laconic2d:${{steps.vars.outputs.sha}}
- name: Tag docker image
run: docker tag git.vdb.to/cerc-io/laconic2d/laconic2d:${{steps.vars.outputs.sha}} git.vdb.to/cerc-io/laconic2d/laconic2d:${{steps.vars.outputs.tag}}
- name: Docker Login
run: echo ${{ secrets.CICD_PUBLISH_TOKEN }} | docker login https://git.vdb.to -u cerccicd --password-stdin
- name: Docker Push
run: docker push git.vdb.to/cerc-io/laconic2d/laconic2d:${{steps.vars.outputs.sha}}
- name: Docker Push TAGGED
run: docker push git.vdb.to/cerc-io/laconic2d/laconic2d:${{steps.vars.outputs.tag}}