Skip to content

Merge branch 'main' of github.com:metoro-io/statusphere #115

Merge branch 'main' of github.com:metoro-io/statusphere

Merge branch 'main' of github.com:metoro-io/statusphere #115

# Create a new release when a tag is pushed, create a docker image and push it to docker hub
name: Publish ApiServer
on:
push:
tags:
- 'v*'
jobs:
publish:
name: Publish
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.RELEASE_CREATION_TOKEN }}
with:
tag_name: apiserver-${{ github.ref }}
release_name: ApiServer ${{ github.ref }}
draft: false
prerelease: false
- name: Login to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and Push Docker Image
uses: docker/build-push-action@v4
with:
context: ./
file: ./apiserver/Dockerfile
push: true
tags: |
${{ secrets.DOCKERHUB_USERNAME }}/statusphere-apiserver:${{ github.ref_name }}
${{ secrets.DOCKERHUB_USERNAME }}/statusphere-apiserver:latest