Skip to content

ci: ensure to checkout repo as the jobs first step #24

ci: ensure to checkout repo as the jobs first step

ci: ensure to checkout repo as the jobs first step #24

Workflow file for this run

name: publish to docker hub
on: [push, workflow_dispatch]
jobs:
get_version:
name: Clone and get version
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Get version
shell: bash
id: release
run: echo "VERSION=$(node -e "console.log(require('./lerna.json').version)")" >> $GITHUB_OUTPUT
outputs:
version: ${{ steps.release.outputs.VERSION }}
publish_apiserver:
name: Publish Goodtok API Server
runs-on: ubuntu-latest
needs: [get_version]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Publish to Docker Hub
uses: elgohr/Publish-Docker-Github-Action@v5
with:
name: fonoster/goodtok-apiserver
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_PASSWORD }}
context: .
dockerfile: mods/apiserver/Dockerfile
tags: "latest,${{ needs.get_version.outputs.VERSION }}"