Update flake.yml #7
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: "Container build" | |
on: | |
push: | |
branches: | |
- master | |
jobs: | |
x86: | |
runs-on: ubuntu-latest | |
steps: | |
- name: checkout repo | |
uses: actions/checkout@v3 | |
- name: install nix | |
uses: cachix/install-nix-action@v22 | |
with: | |
github_access_token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Login to registry | |
uses: docker/login-action@v2 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: build and push container | |
run: nix run .#docker.copyToRegistry | |
arm: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: uraimo/run-on-arch-action@v2 | |
name: Run commands | |
id: runcmd | |
with: | |
arch: arm64 | |
distro: ubuntu23.04 | |
# Not required, but speeds up builds by storing container images in | |
# a GitHub package registry. | |
githubToken: ${{ github.token }} | |
# Set an output parameter `uname` for use in subsequent steps | |
run: | | |
uname -a | |
echo ::set-output name=uname::$(uname -a) | |
- name: checkout repo | |
uses: actions/checkout@v3 | |
- name: install nix | |
uses: cachix/install-nix-action@v22 | |
with: | |
github_access_token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Login to registry | |
uses: docker/login-action@v2 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: build and push container | |
run: nix run .#docker.copyToRegistry |