From 9fffc2d6935e4c9b0adbdc3aa798ce14e6198aaa Mon Sep 17 00:00:00 2001 From: TraceEntertains <73800394+TraceEntertains@users.noreply.github.com> Date: Sat, 22 Feb 2025 17:30:48 -0500 Subject: [PATCH 1/2] Hotfix 2 (electric boogaloo), initialize server accounts (#17) --- globals/accounts.go | 7 ++++++- init.go | 2 ++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/globals/accounts.go b/globals/accounts.go index 02bd2ad..e2c759b 100644 --- a/globals/accounts.go +++ b/globals/accounts.go @@ -10,6 +10,11 @@ import ( var AuthenticationServerAccount *nex.Account var SecureServerAccount *nex.Account +func InitAccounts() { + AuthenticationServerAccount = nex.NewAccount(1, "Quazal Authentication", KerberosPassword) + SecureServerAccount = nex.NewAccount(2, "Quazal Rendez-Vous", KerberosPassword) +} + func AccountDetailsByPID(pid types.PID) (*nex.Account, *nex.Error) { if pid.Equals(AuthenticationServerAccount.PID) { return AuthenticationServerAccount, nil @@ -53,4 +58,4 @@ func AccountDetailsByUsername(username string) (*nex.Account, *nex.Error) { account := nex.NewAccount(pid, username, password) return account, nil -} \ No newline at end of file +} diff --git a/init.go b/init.go index e4c0ab7..40d1710 100644 --- a/init.go +++ b/init.go @@ -53,6 +53,8 @@ func init() { globals.KerberosPassword = string(kerberosPassword) + globals.InitAccounts() + if strings.TrimSpace(authenticationServerPort) == "" { globals.Logger.Error("PN_SMM_AUTHENTICATION_SERVER_PORT environment variable not set") os.Exit(0) From 992cb5b00a3451524833ce2521f5017263c281db Mon Sep 17 00:00:00 2001 From: William Oldham Date: Sat, 22 Feb 2025 22:42:56 +0000 Subject: [PATCH 2/2] ci: split ARM and AMD building of Docker images --- .github/workflows/docker.yml | 53 ++++++++++++++++++++++++++++++++++-- 1 file changed, 50 insertions(+), 3 deletions(-) diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 8968b7d..0ce6a03 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -10,7 +10,8 @@ env: IMAGE_NAME: ${{ github.repository }} jobs: - build-publish: + build-publish-amd64: + name: Build and Publish Docker Image (amd64) env: SHOULD_PUSH_IMAGE: ${{ (github.event_name == 'push' && (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/dev')) || github.event_name == 'workflow_dispatch' }} runs-on: ubuntu-latest @@ -48,9 +49,55 @@ jobs: id: build-and-push uses: docker/build-push-action@v6 with: - platforms: linux/amd64,linux/arm64 + platforms: linux/amd64 push: ${{ env.SHOULD_PUSH_IMAGE }} tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} cache-from: type=gha - cache-to: type=gha,mode=max \ No newline at end of file + cache-to: type=gha,mode=max + + build-publish-arm64: + name: Build and Publish Docker Image (arm64) + env: + SHOULD_PUSH_IMAGE: ${{ (github.event_name == 'push' && (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/dev')) || github.event_name == 'workflow_dispatch' }} + runs-on: ubuntu-24.04-arm + + permissions: + contents: read + packages: write + + steps: + - name: Set up QEMU for Docker + uses: docker/setup-qemu-action@v3 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + + - name: Log into the container registry + if: ${{ env.SHOULD_PUSH_IMAGE == 'true' }} + uses: docker/login-action@v3 + with: + registry: ${{ env.REGISTRY }} + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Extract Docker metadata + id: meta + uses: docker/metadata-action@v5 + with: + images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} + tags: | + type=raw,value=latest-arm,enable=${{ github.ref == 'refs/heads/master' }} + type=raw,value=edge-arm,enable=${{ github.ref == 'refs/heads/dev' }} + type=sha,suffix=-arm + + - name: Build and push Docker image + id: build-and-push + uses: docker/build-push-action@v6 + with: + platforms: linux/arm64 + push: ${{ env.SHOULD_PUSH_IMAGE }} + tags: ${{ steps.meta.outputs.tags }} + labels: ${{ steps.meta.outputs.labels }} + cache-from: type=gha + cache-to: type=gha,mode=max