From 3737e5c4d754ed29235f53390cf69912691235ed Mon Sep 17 00:00:00 2001 From: Raphael Grewe Date: Thu, 14 Mar 2024 08:31:23 +0100 Subject: [PATCH] Change: Use new registry ghcr.io --- .github/actions/autopkgtest/action.yml | 6 ++++++ .github/actions/blhc/action.yml | 6 ++++++ .github/actions/build/action.yml | 8 ++++++++ .github/actions/clean/action.yml | 6 ++++++ .github/actions/lintian/action.yml | 6 ++++++ .github/actions/piuparts/action.yml | 18 +++++++++++++++++- .github/actions/publish/action.yml | 6 ++++++ .github/actions/upload/action.yml | 6 ++++++ .github/workflows/gos-ci.yml | 16 ++++++++++++++++ 9 files changed, 77 insertions(+), 1 deletion(-) diff --git a/.github/actions/autopkgtest/action.yml b/.github/actions/autopkgtest/action.yml index a31bf6b..31823bb 100644 --- a/.github/actions/autopkgtest/action.yml +++ b/.github/actions/autopkgtest/action.yml @@ -16,6 +16,12 @@ inputs: runs: using: "composite" steps: + - name: Login to GitHub Container Registry + uses: docker/login-action@v3 + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ env.GITHUB_TOKEN }} - run: | docker run --pull always --privileged --rm -v ${{ env.CI_PROJECT_DIR }}:/__w -e WORKING_DIR="/__w" --workdir /__w ${{ inputs.registry }}/${{ inputs.arch }}/autopkgtest:${{ inputs.debian_release_name }} shell: bash diff --git a/.github/actions/blhc/action.yml b/.github/actions/blhc/action.yml index 1d97f57..a992345 100644 --- a/.github/actions/blhc/action.yml +++ b/.github/actions/blhc/action.yml @@ -15,6 +15,12 @@ inputs: runs: using: "composite" steps: + - name: Login to GitHub Container Registry + uses: docker/login-action@v3 + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ env.GITHUB_TOKEN }} - run: | docker run --pull always --rm -v ${{ env.CI_PROJECT_DIR }}:/__w --workdir /__w -e WORKING_DIR="/__w/debian/output" ${{ inputs.registry }}/${{ inputs.arch }}/blhc:${{ inputs.debian_release_name }} shell: bash diff --git a/.github/actions/build/action.yml b/.github/actions/build/action.yml index d352213..9d7a7c3 100644 --- a/.github/actions/build/action.yml +++ b/.github/actions/build/action.yml @@ -16,6 +16,12 @@ inputs: runs: using: "composite" steps: + - name: Login to GitHub Container Registry + uses: docker/login-action@v3 + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ env.GITHUB_TOKEN }} - id: build_docker run: | docker run \ @@ -30,5 +36,7 @@ runs: -e WORKING_DIR="${{ env.WORKING_DIR }}" \ -e CI_PROJECT_DIR="${{ env.CI_PROJECT_DIR }}" \ -e TOKEN="${{ env.TOKEN }}" \ + -e GITHUB_TOKEN="${{ env.GITHUB_TOKEN }}" \ + -e GITHUB_ACTOR="${{ github.actor }}" \ ${{ inputs.registry }}/${{ inputs.arch }}/gbp:${{ inputs.debian_release_name }} shell: bash diff --git a/.github/actions/clean/action.yml b/.github/actions/clean/action.yml index b9c1b91..c1d5569 100644 --- a/.github/actions/clean/action.yml +++ b/.github/actions/clean/action.yml @@ -19,6 +19,12 @@ inputs: runs: using: "composite" steps: + - name: Login to GitHub Container Registry + uses: docker/login-action@v3 + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ env.GITHUB_TOKEN }} - run: | docker run --rm -v ${{ env.CI_PROJECT_DIR }}:/__w -e GOS_REPOSITORY_HOST="${{ inputs.host }}" -e GOS_REPOSITORY_KEY="${{ inputs.key }}" -e WORKING_DIR="/__w" --workdir /__w ${{ inputs.registry }}/${{ inputs.arch }}/repository:bookworm /action.sh --clean shell: bash diff --git a/.github/actions/lintian/action.yml b/.github/actions/lintian/action.yml index 95e1e97..ace4874 100644 --- a/.github/actions/lintian/action.yml +++ b/.github/actions/lintian/action.yml @@ -16,6 +16,12 @@ inputs: runs: using: "composite" steps: + - name: Login to GitHub Container Registry + uses: docker/login-action@v3 + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ env.GITHUB_TOKEN }} - run: | docker run --pull always --rm -v ${{ env.CI_PROJECT_DIR }}:/__w --workdir /__w -e WORKING_DIR="/__w/debian/output" ${{ inputs.registry }}/${{ inputs.arch }}/lintian:${{ inputs.release }} shell: bash diff --git a/.github/actions/piuparts/action.yml b/.github/actions/piuparts/action.yml index d2be7ed..4ab0e02 100644 --- a/.github/actions/piuparts/action.yml +++ b/.github/actions/piuparts/action.yml @@ -16,6 +16,22 @@ inputs: runs: using: "composite" steps: + - name: Login to GitHub Container Registry + uses: docker/login-action@v3 + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ env.GITHUB_TOKEN }} - run: | - docker run --pull always --privileged --rm -v /var/run/docker.sock:/var/run/docker.sock -v ${{ env.CI_PROJECT_DIR }}:/__w --workdir /__w -e WORKING_DIR="/__w/debian/output" ${{ inputs.registry }}/${{ inputs.arch }}/piuparts:${{ inputs.debian_release_name }} /run.sh + docker run \ + --pull always \ + --privileged \ + --rm \ + -v /var/run/docker.sock:/var/run/docker.sock \ + -v ${{ env.CI_PROJECT_DIR }}:/__w \ + --workdir /__w \ + -e WORKING_DIR="/__w/debian/output" \ + -e GITHUB_TOKEN="${{ env.GITHUB_TOKEN }}" \ + -e GITHUB_ACTOR="${{ github.actor }}" \ + ${{ inputs.registry }}/${{ inputs.arch }}/piuparts:${{ inputs.debian_release_name }} /run.sh shell: bash diff --git a/.github/actions/publish/action.yml b/.github/actions/publish/action.yml index 6433f60..9dd7175 100644 --- a/.github/actions/publish/action.yml +++ b/.github/actions/publish/action.yml @@ -19,6 +19,12 @@ inputs: runs: using: "composite" steps: + - name: Login to GitHub Container Registry + uses: docker/login-action@v3 + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ env.GITHUB_TOKEN }} - run: | docker run --rm -v ${{ env.CI_PROJECT_DIR }}:/__w -e GOS_REPOSITORY_HOST="${{ inputs.host }}" -e GOS_REPOSITORY_KEY="${{ inputs.key }}" -e WORKING_DIR="/__w" --workdir /__w ${{ inputs.registry }}/${{ inputs.arch }}/repository:bookworm /action.sh --publish shell: bash diff --git a/.github/actions/upload/action.yml b/.github/actions/upload/action.yml index 9eed560..2da02f1 100644 --- a/.github/actions/upload/action.yml +++ b/.github/actions/upload/action.yml @@ -19,6 +19,12 @@ inputs: runs: using: "composite" steps: + - name: Login to GitHub Container Registry + uses: docker/login-action@v3 + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ env.GITHUB_TOKEN }} - run: | docker run --pull always --rm -v ${{ env.CI_PROJECT_DIR }}:${{ env.CI_PROJECT_DIR }} -e GOS_REPOSITORY_HOST="${{ inputs.host }}" -e GOS_REPOSITORY_KEY="${{ inputs.key }}" -e WORKING_DIR="${{ env.WORKING_DIR }}" --workdir ${{ env.CI_PROJECT_DIR }} ${{ inputs.registry }}/${{ inputs.arch }}/repository:bookworm /action.sh --upload shell: bash diff --git a/.github/workflows/gos-ci.yml b/.github/workflows/gos-ci.yml index f5ec48c..2f86bc5 100644 --- a/.github/workflows/gos-ci.yml +++ b/.github/workflows/gos-ci.yml @@ -98,6 +98,8 @@ jobs: arch: ${{ matrix.arch }}${{ matrix.subversion }} registry: ${{ secrets.GOS_CI_REGISTRY }} debian_release_name: ${{ needs.gather.outputs.debian_release_name }} + env: + GITHUB_TOKEN: ${{ github.token }} - name: Upload changes uses: actions/upload-artifact@v4 with: @@ -126,6 +128,8 @@ jobs: registry: ${{ secrets.GOS_CI_REGISTRY }} key: ${{ secrets.GOS_REPOSITORY_KEY }} host: ${{ secrets.GOS_REPOSITORY_HOST }} + env: + GITHUB_TOKEN: ${{ github.token }} - run: rm -r ${{ env.WORKING_DIR }}/* test-lintian: @@ -154,6 +158,8 @@ jobs: arch: ${{ matrix.arch }}${{ matrix.subversion }} registry: ${{ secrets.GOS_CI_REGISTRY }} release: ${{ needs.gather.outputs.release }} + env: + GITHUB_TOKEN: ${{ github.token }} test-autopkgtest: name: Test with autopkgtest @@ -183,6 +189,8 @@ jobs: arch: ${{ matrix.arch }}${{ matrix.subversion }} registry: ${{ secrets.GOS_CI_REGISTRY }} debian_release_name: ${{ needs.gather.outputs.debian_release_name }} + env: + GITHUB_TOKEN: ${{ github.token }} test-piuparts: name: Test with piuparts @@ -211,6 +219,8 @@ jobs: arch: ${{ matrix.arch }}${{ matrix.subversion }} registry: ${{ secrets.GOS_CI_REGISTRY }} debian_release_name: ${{ needs.gather.outputs.debian_release_name }} + env: + GITHUB_TOKEN: ${{ github.token }} test-blhc: name: Test with blhc @@ -238,6 +248,8 @@ jobs: arch: ${{ matrix.arch }}${{ matrix.subversion }} registry: ${{ secrets.GOS_CI_REGISTRY }} debian_release_name: ${{ needs.gather.outputs.debian_release_name }} + env: + GITHUB_TOKEN: ${{ github.token }} publish: name: Publish new package @@ -262,6 +274,8 @@ jobs: registry: ${{ secrets.GOS_CI_REGISTRY }} key: ${{ secrets.GOS_REPOSITORY_KEY }} host: ${{ secrets.GOS_REPOSITORY_HOST }} + env: + GITHUB_TOKEN: ${{ github.token }} cleanup-repo: runs-on: self-hosted-generic @@ -276,6 +290,8 @@ jobs: registry: ${{ secrets.GOS_CI_REGISTRY }} key: ${{ secrets.GOS_REPOSITORY_KEY }} host: ${{ secrets.GOS_REPOSITORY_HOST }} + env: + GITHUB_TOKEN: ${{ github.token }} cleanup-runner: strategy: