cuelang.org/go@v0.10.1/internal/_e2e/testdata/script/github_app_private.txtar (about)

     1  # Publish a CUE module under a private GitHub repository namespace
     2  # where the $CUE_TEST_LOGINS tokens have full read-write access.
     3  # Publish a version for this new repository with `cue mod publish`,
     4  # and then fetch the module as a dependency via cmd/cue.
     5  
     6  github-repo-module private
     7  env VERSION=v0.0.1
     8  env MODVER=${MODULE}@v0
     9  
    10  cd publish
    11  
    12  exec cue mod init --source self ${MODVER}
    13  exec cue mod publish ${VERSION}
    14  
    15  cd ../depend
    16  
    17  env-fill out_foo.cue
    18  exec cue mod init --source self depend.localhost
    19  exec cue mod tidy
    20  exec cue export
    21  cmp stdout export.golden
    22  
    23  # TODO(mvdan): Use another registry token without access to this private repo
    24  # and check that they cannot list, fetch, or publish any versions.
    25  
    26  -- publish/foo.cue --
    27  package publish
    28  
    29  foo: "foo value"
    30  
    31  -- depend/out_foo.cue --
    32  package depend
    33  
    34  import mt "${MODVER}:publish"
    35  
    36  out: mt.foo
    37  -- depend/export.golden --
    38  {
    39      "out": "foo value"
    40  }