Skip to content

Commit

Permalink
feat(workflows/docker_images.yaml): Add upload to Docker Hub
Browse files Browse the repository at this point in the history
We need to upload images to Docker Hub as well.

Signed-off-by: Denys Fedoryshchenko <[email protected]>
  • Loading branch information
nuclearcat committed Jan 20, 2025
1 parent 29ecb1b commit b8033dd
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 4 deletions.
25 changes: 21 additions & 4 deletions .github/workflows/docker_images.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,13 @@ jobs:
cd kernelci-core
python3 -m pip install '.[dev]'
sudo cp -R config /etc/kernelci/
- name: Login to the DockerHub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Log in to the Container registry
uses: docker/login-action@65b78e6e13532edd9afa3aa52ac7964289d1a9c1
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
Expand All @@ -64,6 +69,8 @@ jobs:
export core_url=$(git remote get-url origin)
kci_arg="build --push --build-arg core_rev=$core_rev --prefix=ghcr.io/kernelci/ --build-arg core_url=$core_url"
./kci docker $kci_arg ${{ matrix.kcicmd }} --arch ${{ matrix.kciarch }}
kci_arg="build --push --build-arg core_rev=$core_rev --prefix=kernelci/ --build-arg core_url=$core_url"
./kci docker $kci_arg ${{ matrix.kcicmd }} --arch ${{ matrix.kciarch }}
- name: build base kernelci docker image for other branches
if: ${{ env.USER_GIT_BRANCH != 'main' }}
run: |
Expand All @@ -73,6 +80,8 @@ jobs:
echo "core_rev=$core_rev core_url=$core_url"
kci_arg="build --push --verbose --build-arg core_rev=$core_rev --prefix=ghcr.io/kernelci/staging- --build-arg core_url=$core_url"
./kci docker $kci_arg ${{ matrix.kcicmd }} --arch ${{ matrix.kciarch }}
kci_arg="build --push --verbose --build-arg core_rev=$core_rev --prefix=kernelci/staging- --build-arg core_url=$core_url"
./kci docker $kci_arg ${{ matrix.kcicmd }} --arch ${{ matrix.kciarch }}
docker-misc-build:
strategy:
Expand All @@ -87,7 +96,6 @@ jobs:
'kernelci lava-callback',
'k8s kernelci',
'qemu',

]
# only selected people can trigger this job
if: contains('["nuclearcat","JenySadadia","a-wai","broonie","laura-nao"]', github.actor)
Expand Down Expand Up @@ -124,8 +132,13 @@ jobs:
cd kernelci-core
python3 -m pip install '.[dev]'
sudo cp -R config /etc/kernelci/
- name: Login to the DockerHub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Log in to the Container registry
uses: docker/login-action@65b78e6e13532edd9afa3aa52ac7964289d1a9c1
uses: docker/login-action@v3
with:
registry: ghcr.io
username: kernelci
Expand All @@ -143,6 +156,8 @@ jobs:
rev_arg="--build-arg core_rev=$core_rev --build-arg api_rev=$api_rev --build-arg pipeline_rev=$pipeline_rev"
kci_arg="build --push $rev_arg --prefix=ghcr.io/kernelci/"
./kci docker $kci_arg ${{ matrix.kcicmd }}
kci_arg="build --push $rev_arg --prefix=kernelci/"
./kci docker $kci_arg ${{ matrix.kcicmd }}
- name: build base kernelci docker image for other branches
if: ${{ env.USER_GIT_BRANCH != 'main' }}
run: |
Expand All @@ -155,4 +170,6 @@ jobs:
cd ../kernelci-core
rev_arg="--build-arg core_rev=$core_rev --build-arg api_rev=$api_rev --build-arg pipeline_rev=$pipeline_rev"
kci_arg="build --push $rev_arg --prefix=ghcr.io/kernelci/staging-"
./kci docker $kci_arg ${{ matrix.kcicmd }}
./kci docker $kci_arg ${{ matrix.kcicmd }}
kci_arg="build --push $rev_arg --prefix=kernelci/staging-"
./kci docker $kci_arg ${{ matrix.kcicmd }}
1 change: 1 addition & 0 deletions .github/workflows/staging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,4 @@ jobs:
with:
GIT_OWNER: 'kernelci'
GIT_BRANCH: 'staging-snapshot'
secrets: inherit

0 comments on commit b8033dd

Please sign in to comment.