Skip to content

Commit

Permalink
debugging
Browse files Browse the repository at this point in the history
  • Loading branch information
javierhonduco committed May 7, 2024
1 parent 60b2423 commit 8496dad
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
14 changes: 13 additions & 1 deletion .github/workflows/container.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,22 @@ jobs:
permissions:
id-token: write
contents: read
packages: write

steps:
- uses: actions/checkout@main
- uses: DeterminateSystems/nix-installer-action@main
- uses: DeterminateSystems/magic-nix-cache-action@main

- name: Set up nix dev env
run: nix develop --command echo 0
- name: Build container image
run: nix build .#container
run: nix build .#container
- name: Push container image on commits to main
if: ${{ github.ref_name == 'main' }}
run: |
nix develop --ignore-environment --command skopeo copy --dest-creds="${{ github.repository_owner }}:${{ github.token }}" docker-archive:./result docker://ghcr.io/javierhonduco/lightswitch:main-${{ github.sha }}
- name: Push container image on new releases
if: ${{ github.ref_type == 'tag' }}
run: |
nix develop --ignore-environment --command skopeo copy --dest-creds="${{ github.repository_owner }}:${{ github.token }}" docker-archive:./result docker://ghcr.io/javierhonduco/lightswitch:${{ github.ref_name }}
2 changes: 1 addition & 1 deletion flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@
default = lightswitch;
container = pkgs.dockerTools.buildLayeredImage {
name = "lightswitch";
tag = "${self.dirtyShortRev}";
config = {
Cmd = [ "${lightswitch}/bin/lightswitch" ];
Env = [
Expand All @@ -75,6 +74,7 @@
gdb
openssl
# Other tools
skopeo
cargo-edit
# snapshot testing plugin binary
cargo-insta
Expand Down

0 comments on commit 8496dad

Please sign in to comment.