GitHub Actions
Entrepot trusts GitLab CI id_tokens natively; other CI systems
authenticate with a service-account token stored as a CI secret. Give each
pipeline its own service account, bind it only to the repositories it needs,
and give the token scopes and an expiry.
Create the service account and token
Section titled “Create the service account and token”-
Create the account and grant it access
Terminal window E=https://entrepot.example.comcurl -fsS -H "Authorization: Bearer $ADMIN" -X POST $E/api/v1/service-accounts \-d '{"name":"github-acme-web","description":"GitHub Actions: acme/web"}'curl -fsS -H "Authorization: Bearer $ADMIN" -X POST $E/api/v1/role-bindings \-d '{"role":"developer","subjectType":"user","subject":"sa:github-acme-web","repositoryPattern":"npm-internal|docker-internal"}'curl -fsS -H "Authorization: Bearer $ADMIN" -X POST $E/api/v1/role-bindings \-d '{"role":"viewer","subjectType":"user","subject":"sa:github-acme-web","repositoryPattern":"*-group"}' -
Create a token — the secret is returned once, in
.secret:Terminal window curl -fsS -H "Authorization: Bearer $ADMIN" -X POST \$E/api/v1/service-accounts/github-acme-web/tokens \-d '{"name":"actions","scopes":["read","write"],"expiresInDays":90}' | jq -r .secret -
Store it as a repository or organisation secret, e.g.
ENTREPOT_TOKEN(Settings → Secrets and variables → Actions).
Prefer Terraform for this:
entrepot_service_account and
entrepot_service_account_token
expose the token as a sensitive attribute you can pass straight to the GitHub
provider’s github_actions_secret, so it never passes through a terminal.
Workflow examples
Section titled “Workflow examples”on: push: tags: ['v*']jobs: publish: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - uses: actions/setup-node@v4 with: node-version: 22 registry-url: https://entrepot.example.com/repository/npm-internal/ - run: npm ci env: NODE_AUTH_TOKEN: ${{ secrets.ENTREPOT_TOKEN }} - run: npm publish env: NODE_AUTH_TOKEN: ${{ secrets.ENTREPOT_TOKEN }}setup-node writes an .npmrc with
//entrepot.example.com/repository/npm-internal/:_authToken=${NODE_AUTH_TOKEN}.
jobs: publish: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - uses: actions/setup-python@v5 with: { python-version: '3.12' } - run: pip install build twine && python -m build - run: twine upload --repository-url https://entrepot.example.com/repository/pypi-internal/ dist/* env: TWINE_USERNAME: token TWINE_PASSWORD: ${{ secrets.ENTREPOT_TOKEN }}jobs: image: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - uses: docker/login-action@v3 with: registry: entrepot.example.com username: token password: ${{ secrets.ENTREPOT_TOKEN }} - uses: docker/build-push-action@v6 with: push: true tags: entrepot.example.com/docker-internal/acme/web:${{ github.sha }} - run: | helm package ./chart curl -f --data-binary @$(ls *.tgz) \ -H "Authorization: Bearer $ENTREPOT_TOKEN" \ https://entrepot.example.com/repository/helm-internal/api/charts env: ENTREPOT_TOKEN: ${{ secrets.ENTREPOT_TOKEN }} - run: | curl -f -H "Authorization: Bearer $ENTREPOT_TOKEN" -T dist/app.tar.gz \ "https://entrepot.example.com/repository/files/acme/web/${GITHUB_SHA}/app.tar.gz" env: ENTREPOT_TOKEN: ${{ secrets.ENTREPOT_TOKEN }}