better code #10
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: Publish GitHub Packages | |
on: push | |
jobs: | |
publish-github-packages: | |
name: Publish GitHub Packages | |
runs-on: ubuntu-latest | |
permissions: | |
packages: write | |
contents: read | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: cachix/install-nix-action@v18 | |
with: | |
github_access_token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Build with Nix | |
run: nix build .#fvckbot-docker | |
- name: Log in to GitHub Packages | |
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u $ --password-stdin | |
- name: Push Image to GitHub Packages | |
run: | | |
cat result | docker load | |
docker tag fvckbot:latest ghcr.io/nicball/fvckbot:latest | |
docker push ghcr.io/nicball/fvckbot |