Merge pull request #14 from sayan-mitra-9800/master #14
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: pubish docker image | |
on: | |
push: | |
branches: | |
- master | |
jobs: | |
build-and-publish: | |
runs-on: ubuntu-latest | |
steps: | |
- name: checkout repository | |
uses: actions/checkout@v4 | |
- name: install nix | |
uses: cachix/install-nix-action@v27 | |
with: | |
github_access_token: ${{ secrets.GITHUB_TOKEN }} | |
- name: build docker image | |
run: nix build -L .#dockerImage | |
- name: log in to github container registry | |
uses: docker/login-action@v3 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: publish docker image | |
run: | | |
docker load < result | |
docker tag lurker:latest ghcr.io/${{ github.repository_owner }}/lurker:latest | |
docker push ghcr.io/${{ github.repository_owner }}/lurker:latest |