name: Gitea Runner E2E Publish on: workflow_dispatch: push: branches: [runner/gitea-e2e] jobs: publish: runs-on: [ubuntu-latest, bytelyst, hostinger] container: image: node:20-bookworm options: -v /home/gitea-runner/.gitea_publish_npmrc:/run/secrets/gitea_publish_npmrc:ro steps: - name: Checkout uses: actions/checkout@v4 with: github-server-url: https://gitea.bytelyst.com - name: Install pnpm run: | npm install -g pnpm@9.12.0 pnpm --version - name: Set test version working-directory: packages/_runner-e2e-test run: | VERSION="0.0.1-e2e.${GITHUB_RUN_ID:-$(date +%s)}" echo "TEST_VERSION=$VERSION" >> "$GITHUB_ENV" npm version "$VERSION" --no-git-tag-version --allow-same-version node -p "require('./package.json').version" - name: Configure registry .npmrc working-directory: packages/_runner-e2e-test run: | cp /run/secrets/gitea_publish_npmrc .npmrc sed -E 's|(:_auth=).*|\1***|; s|(:_authToken=).*|\1***|' .npmrc - name: Publish to Hostinger Gitea working-directory: packages/_runner-e2e-test run: pnpm publish --no-git-checks --registry https://gitea.bytelyst.com/api/packages/bytelyst/npm/ - name: Verify package returned by Gitea working-directory: packages/_runner-e2e-test run: | npm view "@bytelyst/runner-e2e-test@$TEST_VERSION" version --registry https://gitea.bytelyst.com/api/packages/bytelyst/npm/ | grep -qx "$TEST_VERSION" echo "PASS: version in Gitea" - name: Verify pnpm install and require works run: | mkdir -p /tmp/runner-e2e-consumer && cd /tmp/runner-e2e-consumer cp /run/secrets/gitea_publish_npmrc .npmrc cat > package.json <