minor changes #35
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |