-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Action does not work with act
#10
Comments
I haven't encountered/tried this combination of devbox > act > devbox scenario. What I've seen the most is testing locally with I'm not sure how act works, and whether it installs a fresh nix + devbox every time you run locally (I hope not, or else the experience would be very slow). Thoughts? @mikenikles |
I'm on the same page in terms of
I was hoping to get this to work to showcase how someone can use a Caching the Devbox CLI works the same as it does in a GitHub workflow, so that helps with the experience locally. This is a low priority issue from my point of view. I figured I'd open it to see if anyone on the team goes like "Ah... I think I have a fix for that" 😄. Happy to even close it and if I ever get back to using |
this is now a problem, because I cannot debug why a goreleaser run fails to run due to the devbox/installer inexplicably not making goreleaser available as a command. having to do a release, wait for a build, discover that yet again the problem isn't fixed gets very very tiring. on:
push:
branches:
- master
permissions:
contents: write
pull-requests: write
packages: write
name: ReleaseManagement
jobs:
Release:
name: Release Please
runs-on: ubuntu-22.04
outputs:
release_created: ${{ steps.release.outputs.release_created }}
releases_created: ${{ steps.release.outputs.releases_created }}
tag_name: ${{ steps.release.outputs.tag_name }} # e.g. v1.0.0
version: ${{ steps.release.outputs.version }} # e.g. 1.0.0
all: ${{ toJSON(steps.release.outputs) }}
steps:
- uses: google-github-actions/release-please-action@v3
id: release-please
# if we're using ACT, skip this
if: ${{ !github.event.act }}
with:
token: ${{ secrets.GITHUB_TOKEN }}
command: manifest
release-type: go
extra-files: |
meta/package.go
- id: release
env:
NOT_ACT: ${{ !github.event.act }}
run: |
// if we're using ACT, output that a release was created
// otherwise output all the release info from the release-please action
if [ "${NOT_ACT}" == "true" ]; then
echo "name=release_created::${{ steps.release-please.outputs.release_created }}" >> $GITHUB_OUTPUT
echo "name=releases_created::${{ steps.release-please.outputs.releases_created }}" >> $GITHUB_OUTPUT
echo "name=tag_name::${{ steps.release-please.outputs.tag_name }}" >> $GITHUB_OUTPUT
echo "name=version::${{ steps.release-please.outputs.version }}" >> $GITHUB_OUTPUT
else
echo "name=release_created::true" >> $GITHUB_OUTPUT
echo "name=releases_created::true" >> $GITHUB_OUTPUT
echo "name=tag_name::snapshot" >> $GITHUB_OUTPUT
echo "name=version::snaphot" >> $GITHUB_OUTPUT
fi
Build:
if: needs.Release.outputs.releases_created
runs-on: ubuntu-22.04
needs: [Release]
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- run: git fetch --force --tags
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- uses: docker/setup-buildx-action@v2
- name: Docker Login
uses: docker/login-action@65b78e6e13532edd9afa3aa52ac7964289d1a9c1
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: setup jetpack devbox
uses: jetpack-io/[email protected]
- name: Run GoReleaser
env:
registry: ${{ env.REGISTRY }}
IMAGE_NAME: ${{ env.IMAGE_NAME }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
devbox run -- gorelease release --clean
|
related: catthehacker/docker_images#119 |
Hi @airtonix, The error is caused by determinate systems nix installer trying to setup a systemd service for nix by default, but a docker image doesn't have systemd. Can you try adding
|
@LucilleH that got me a bit further, but then ran into this: DeterminateSystems/nix-installer-action#33 so with : - name: Install nix in container
uses: DeterminateSystems/nix-installer-action@v4
with:
logger: pretty
planner: linux
extra-conf: experimental-features = ca-derivations fetch-closure
init: 'none'
- name: setup jetpack devbox
uses: jetpack-io/[email protected]
env:
DEVBOX_DEBUG: 1
with:
skip-nix-installation: 'true'
- name: Run GoReleaser
env:
registry: ${{ env.REGISTRY }}
IMAGE_NAME: ${{ env.IMAGE_NAME }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
if [ "${{ !github.event.act }}" == "true" ]; then
devbox run -- gorelease release --clean
else
devbox run -- gorelease build --clean --snapshot
fi i'm not getting :
|
aha, i get further by running act like :
{
"act": true
} |
and now another error... looks to be something something something github api no auth error
|
ok updated command gets me past that:
and now i'm at the same error i get as when run in githubs infrastructure 👍🏻 debugging time |
as usual... i'm the muppet. original problem was that the command i'm supposed to run is |
@airtonix glad it all worked! 😃 |
I'm working on a follow-up blog post to Test GitHub Actions locally, but with a focus on how to use
act
(GitHub repo) locally and Devbox on GitHub Actions.The work-in-progress pull request is at mikenikles/devbox-github-actions#1.
Setup
configure-devbox-on-ci
branchdevbox shell
devbox run act
I run into two issues:
refresh-cli: true
input,devbox run act
fails withexec: "node": executable file not found in $PATH: unknown
refresh-cli: true
input, the installation of the Devbox CLI is stuck with an interactive prompt "Nix is not installed. Devbox will attempt to install it. Press enter to continue or ctrl-c to exit." This is because of this line in the installation script.I'm opening this in case someone on the Devbox team has insights into how we can make this work, while in parallel I continue to investigate too.
The text was updated successfully, but these errors were encountered: