Was wondering if its possible to use "GitHub Action for Dagger" on private repos, I tried using the .netrc way and get the following error:
failed to get configured module: failed to get module ref kind: input: moduleSource resolve: failed to resolve git src to commit: failed to load cache key: NotFound: rpc error: code = NotFound desc = socket default not found
github workflow:
- name: Checkout
uses: actions/checkout@v4
# https://go.dev/doc/faq#git_https
# https://github.com/actions/checkout/tree/v2.0.0#checkout-a-different-private-repository
- name: Set up .netrc
run: echo 'machine github.com login ${{ secrets.GH_USERNAME }} password ${{ secrets.GH_PAT }}' > $HOME/.netrc
- name: Set up SSH key
run: |
mkdir ~/.ssh
echo '${{ secrets.SSH_KEY }}' > ~/.ssh/id_ed25519
chmod 600 ~/.ssh/id_ed25519
- name: Set up Git
run: /usr/bin/git config --global url.git@github.com:.insteadOf https://github.com/
- name: Build
uses: dagger/dagger-for-github@v6
with:
version: "latest"
verb: call
module: git@github.com:myorg/dagger-poc-spring-petclinic.git@${{ github.ref }}
# module: github.com/${{ github.repository }}@${{ github.ref }}
args: --ref ${{ github.ref }} build
cloud-token: ${{ secrets.DAGGER_CLOUD_TOKEN }}```