diff --git a/.github/workflows/build-push.yml b/.github/workflows/build-push.yml index e7f4c3a..111791b 100644 --- a/.github/workflows/build-push.yml +++ b/.github/workflows/build-push.yml @@ -7,6 +7,10 @@ on: - closed workflow_dispatch: +permissions: + contents: write + packages: write + jobs: build: if: ${{ github.event_name == 'workflow_dispatch' || github.event.pull_request.merged == true }} @@ -16,13 +20,17 @@ jobs: - name: Build app image run: docker build . --tag image - - name: Log into registry - run: echo "${{ secrets.REGISTRYPASSWORD }}" | docker login registry.nordix.org -u ${{ secrets.REGISTRYUSERNAME }} --password-stdin + - name: Login to GitHub Container Registry + uses: docker/login-action@v3 + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} - name: Push app image id: image run: | - IMAGE_ID=registry.nordix.org/eiffel/etos-suite-starter + IMAGE_ID=ghcr.io/eiffel-community/etos-suite-starter # Strip git ref prefix from version VERSION=$(echo "${{ github.ref }}" | sed -e 's,.*/\(.*\),\1,') # Strip "v" prefix from tag name @@ -40,7 +48,7 @@ jobs: with: valueFile: 'manifests/base/deployment.yaml' propertyPath: 'spec.template.spec.containers[0].image' - value: registry.nordix.org/eiffel/etos-suite-starter:${{ steps.image.outputs.version }} + value: ghcr.io/eiffel-community/etos-suite-starter:${{ steps.image.outputs.version }} branch: main commitChange: true message: Updating manifest image to version ${{ steps.image.outputs.version }} diff --git a/manifests/base/deployment.yaml b/manifests/base/deployment.yaml index 632d72f..f609735 100644 --- a/manifests/base/deployment.yaml +++ b/manifests/base/deployment.yaml @@ -18,7 +18,7 @@ spec: serviceAccountName: etos-suite-starter containers: - name: etos-suite-starter - image: registry.nordix.org/eiffel/etos-suite-starter:28ac79b9 + image: ghcr.io/eiffel-community/etos-suite-starter:28ac79b9 imagePullPolicy: IfNotPresent volumeMounts: - name: suite-runner-template