Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ on:
tags:
- '**'

permissions:
contents: read
packages: write # Required for ghcr.io push

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: false
Expand Down Expand Up @@ -205,7 +209,7 @@ jobs:
echo "matrix=$MATRIX" >> $GITHUB_OUTPUT
build:
needs: detect-changes
runs-on: primus-safe-cicd-gfszt
runs-on: primus-safe-cicd-x8qwb
Copy link

Copilot AI Jan 29, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The runner label has changed from 'primus-safe-cicd-gfszt' to 'primus-safe-cicd-x8qwb'. This appears unrelated to the GHCR feature and should be explained in the PR description or moved to a separate commit.

Suggested change
runs-on: primus-safe-cicd-x8qwb
runs-on: primus-safe-cicd-gfszt

Copilot uses AI. Check for mistakes.
timeout-minutes: 120
outputs:
primary_tag: ${{ steps.build-and-push.outputs.primary_tag }}
Expand Down Expand Up @@ -233,6 +237,9 @@ jobs:
curl -v -k "https://${HARBOR_DOMAIN}/api/v2.0/ping" || echo "⚠️ Curl test failed"

buildah login --tls-verify=false -u "${{ secrets.HARBOR_USERNAME }}" -p "${{ secrets.HARBOR_PASSWORD }}" "${{ secrets.HARBOR_HOST }}" && echo "✅ Harbor login successful" || echo "❌ Harbor login failed"

echo "🔐 Logging in to GHCR..."
buildah login -u "${{ github.actor }}" -p "${{ secrets.GITHUB_TOKEN }}" ghcr.io && echo "✅ GHCR login successful" || echo "❌ GHCR login failed"
env:
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
HARBOR_USERNAME: ${{ secrets.HARBOR_USERNAME }}
Expand All @@ -241,6 +248,7 @@ jobs:
env:
DOCKERIO_REPOSITORY: docker.io/primussafe
HARBOR_REPOSITORY: ${{ secrets.HARBOR_HOST }}/primussafe
GHCR_REPOSITORY: ghcr.io/amd-agi/primussafe
IMAGE_VERSION: ${{ needs.detect-changes.outputs.image_version }}
DATE_TIME: ${{ needs.detect-changes.outputs.date_time }}
run: |
Expand All @@ -260,7 +268,7 @@ jobs:
-t ${{ matrix.name }}:${DATE_TIME} \
-f ${{ matrix.dockerfile_path }} .

for repo in ${DOCKERIO_REPOSITORY} ${HARBOR_REPOSITORY}; do
for repo in ${DOCKERIO_REPOSITORY} ${HARBOR_REPOSITORY} ${GHCR_REPOSITORY}; do
echo "🚀 Pushing ${{ matrix.name }} to $repo..."
buildah tag ${{ matrix.name }}:${IMAGE_VERSION} ${repo}/${{ matrix.name }}:${IMAGE_VERSION}
buildah tag ${{ matrix.name }}:${DATE_TIME} ${repo}/${{ matrix.name }}:${DATE_TIME}
Expand Down
2 changes: 2 additions & 0 deletions SaFE/common/pkg/common/constant.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
* See LICENSE for license information.
*/

// Trigger build for ghcr.io push test

Comment on lines +6 to +7
Copy link

Copilot AI Jan 29, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This build trigger comment should be removed before merging. Temporary test triggers don't belong in production code and add no value to the codebase.

Suggested change
// Trigger build for ghcr.io push test

Copilot uses AI. Check for mistakes.
package common

const (
Expand Down
Loading