Skip to content

minor fixes

minor fixes #27

name: Build & Publish
on:
push:
branches: [main]
workflow_dispatch:
jobs:
publish:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Log in to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_TOKEN }}
- name: Install nixpacks
run: curl -sSL https://nixpacks.com/install.sh | bash
- name: Build image with nixpacks
run: nixpacks build . --name ${{ secrets.DOCKER_USERNAME }}/habitkit:${{ github.sha }}
- name: Push image
run: |
docker push ${{ secrets.DOCKER_USERNAME }}/habitkit:${{ github.sha }}
docker tag ${{ secrets.DOCKER_USERNAME }}/habitkit:${{ github.sha }} ${{ secrets.DOCKER_USERNAME }}/habitkit:latest
docker push ${{ secrets.DOCKER_USERNAME }}/habitkit:latest