Vendor SharedCode locally
This commit is contained in:
1 parent
a8c51b8484
commit
6eb8f4ad60
88 files changed
+9708
-275
No files matched your search
@@ -5,6 +5,7 @@ on:
|
||||
branches:
|
||||
- "**"
|
||||
paths:
|
||||
- 'SharedCode/**'
|
||||
- 'backend/**'
|
||||
- 'frontend/**'
|
||||
- 'docker/**'
|
||||
@@ -14,6 +15,7 @@ on:
|
||||
- main
|
||||
- master
|
||||
paths:
|
||||
- 'SharedCode/**'
|
||||
- 'backend/**'
|
||||
- 'frontend/**'
|
||||
- 'docker/**'
|
||||
@@ -36,52 +38,6 @@ jobs:
|
||||
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
|
||||
uses: docker/setup-qemu-action@v4
|
||||
|
||||
- name: Configure Gitea Go registry
|
||||
working-directory: ${{ github.workspace }}
|
||||
shell: bash
|
||||
env:
|
||||
PACKAGE_REGISTRY_USERNAME: ${{ secrets.PACKAGE_REGISTRY_USERNAME }}
|
||||
PACKAGE_REGISTRY_TOKEN: ${{ secrets.PACKAGE_REGISTRY_TOKEN }}
|
||||
run: |
|
||||
set -euo pipefail
|
||||
if [ -z "$PACKAGE_REGISTRY_USERNAME" ] || [ -z "$PACKAGE_REGISTRY_TOKEN" ]; then
|
||||
echo 'PACKAGE_REGISTRY_USERNAME and PACKAGE_REGISTRY_TOKEN secrets are required.' >&2
|
||||
exit 1
|
||||
fi
|
||||
netrc_path="$RUNNER_TEMP/gitea-go.netrc"
|
||||
umask 077
|
||||
{
|
||||
printf 'machine repos.gfranz.ch\n'
|
||||
printf 'login %s\n' "$PACKAGE_REGISTRY_USERNAME"
|
||||
printf 'password %s\n' "$PACKAGE_REGISTRY_TOKEN"
|
||||
} > "$netrc_path"
|
||||
{
|
||||
printf 'NETRC=%s\n' "$netrc_path"
|
||||
printf 'GOAUTH=netrc\n'
|
||||
printf 'GOPROXY=https://repos.gfranz.ch/api/packages/Gabriel20xx/go,https://proxy.golang.org\n'
|
||||
printf 'GONOSUMDB=repos.gfranz.ch/Gabriel20xx/shared/*\n'
|
||||
} >> "$GITHUB_ENV"
|
||||
- name: Configure Gitea npm registry
|
||||
working-directory: ${{ github.workspace }}
|
||||
shell: bash
|
||||
env:
|
||||
PACKAGE_REGISTRY_USERNAME: ${{ secrets.PACKAGE_REGISTRY_USERNAME }}
|
||||
PACKAGE_REGISTRY_TOKEN: ${{ secrets.PACKAGE_REGISTRY_TOKEN }}
|
||||
run: |
|
||||
set -euo pipefail
|
||||
if [ -z "$PACKAGE_REGISTRY_USERNAME" ] || [ -z "$PACKAGE_REGISTRY_TOKEN" ]; then
|
||||
echo 'PACKAGE_REGISTRY_USERNAME and PACKAGE_REGISTRY_TOKEN secrets are required.' >&2
|
||||
exit 1
|
||||
fi
|
||||
npmrc_path="$RUNNER_TEMP/gitea-npmrc"
|
||||
umask 077
|
||||
{
|
||||
printf '@gabriel20xx:registry=https://repos.gfranz.ch/api/packages/Gabriel20xx/npm/\n'
|
||||
printf '//repos.gfranz.ch/api/packages/Gabriel20xx/npm/:_authToken=%s\n' "$PACKAGE_REGISTRY_TOKEN"
|
||||
printf 'always-auth=true\n'
|
||||
} > "$npmrc_path"
|
||||
printf 'NPM_CONFIG_USERCONFIG=%s\n' "$npmrc_path" >> "$GITHUB_ENV"
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v4
|
||||
|
||||
@@ -105,9 +61,6 @@ jobs:
|
||||
- name: Build and push
|
||||
uses: docker/build-push-action@v7
|
||||
with:
|
||||
secret-files: |
|
||||
gitea_npmrc=${{ runner.temp }}/gitea-npmrc
|
||||
gitea_go_netrc=${{ runner.temp }}/gitea-go.netrc
|
||||
context: .
|
||||
file: ./docker/Dockerfile
|
||||
platforms: ${{ (github.event_name == 'push' && github.ref == 'refs/heads/main') && 'linux/amd64,linux/arm64' || 'linux/amd64' }}
|
||||
|
||||
@@ -19,7 +19,6 @@ on:
|
||||
workflow_dispatch: {}
|
||||
|
||||
env:
|
||||
NODE_AUTH_TOKEN: ${{ secrets.PACKAGE_REGISTRY_TOKEN }}
|
||||
|
||||
jobs:
|
||||
lint:
|
||||
@@ -39,8 +38,6 @@ jobs:
|
||||
- name: Setup Node.js
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
registry-url: https://repos.gfranz.ch/api/packages/Gabriel20xx/npm/
|
||||
scope: '@gabriel20xx'
|
||||
node-version: '20'
|
||||
cache: 'npm'
|
||||
cache-dependency-path: frontend/package-lock.json
|
||||
|
||||
@@ -19,7 +19,6 @@ on:
|
||||
workflow_dispatch: {}
|
||||
|
||||
env:
|
||||
NODE_AUTH_TOKEN: ${{ secrets.PACKAGE_REGISTRY_TOKEN }}
|
||||
|
||||
jobs:
|
||||
backend:
|
||||
@@ -36,31 +35,6 @@ jobs:
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
submodules: false
|
||||
- name: Configure Gitea Go registry
|
||||
working-directory: ${{ github.workspace }}
|
||||
shell: bash
|
||||
env:
|
||||
PACKAGE_REGISTRY_USERNAME: ${{ secrets.PACKAGE_REGISTRY_USERNAME }}
|
||||
PACKAGE_REGISTRY_TOKEN: ${{ secrets.PACKAGE_REGISTRY_TOKEN }}
|
||||
run: |
|
||||
set -euo pipefail
|
||||
if [ -z "$PACKAGE_REGISTRY_USERNAME" ] || [ -z "$PACKAGE_REGISTRY_TOKEN" ]; then
|
||||
echo 'PACKAGE_REGISTRY_USERNAME and PACKAGE_REGISTRY_TOKEN secrets are required.' >&2
|
||||
exit 1
|
||||
fi
|
||||
netrc_path="$RUNNER_TEMP/gitea-go.netrc"
|
||||
umask 077
|
||||
{
|
||||
printf 'machine repos.gfranz.ch\n'
|
||||
printf 'login %s\n' "$PACKAGE_REGISTRY_USERNAME"
|
||||
printf 'password %s\n' "$PACKAGE_REGISTRY_TOKEN"
|
||||
} > "$netrc_path"
|
||||
{
|
||||
printf 'NETRC=%s\n' "$netrc_path"
|
||||
printf 'GOAUTH=netrc\n'
|
||||
printf 'GOPROXY=https://repos.gfranz.ch/api/packages/Gabriel20xx/go,https://proxy.golang.org\n'
|
||||
printf 'GONOSUMDB=repos.gfranz.ch/Gabriel20xx/shared/*\n'
|
||||
} >> "$GITHUB_ENV"
|
||||
- name: Set up Go
|
||||
uses: actions/setup-go@v5
|
||||
with:
|
||||
@@ -87,8 +61,6 @@ jobs:
|
||||
- name: Set up Node.js
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
registry-url: https://repos.gfranz.ch/api/packages/Gabriel20xx/npm/
|
||||
scope: '@gabriel20xx'
|
||||
node-version: '22'
|
||||
cache: npm
|
||||
cache-dependency-path: frontend/package-lock.json
|
||||
|
||||
Reference in new issue
Block a user