fix: use docker login

This commit is contained in:
Jason Song
2024-04-02 12:32:55 +08:00
parent e687af9e16
commit 587ea07f53

View File

@@ -164,15 +164,21 @@ jobs:
apt-get update
apt-get install -y skopeo
- name: Login to DockerHub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Copy full 22.04
run: |
for dest in ubuntu-22.04-full ubuntu-22.04-full-${{ steps.meta.outputs.IMAGE_VERSION }} ubuntu-latest-full; do
echo copy catthehacker/ubuntu:full-22.04 -> gitea/runner-images:$dest
skopeo copy -a --dest-creds ${{ secrets.DOCKER_USERNAME }}:${{ secrets.DOCKER_PASSWORD }} docker://ghcr.io/catthehacker/ubuntu:full-22.04 docker://gitea/runner-images:$dest
skopeo copy -a docker://ghcr.io/catthehacker/ubuntu:full-22.04 docker://gitea/runner-images:$dest
done
- name: Copy full 20.04
run: |
for dest in ubuntu-20.04-full ubuntu-20.04-full-${{ steps.meta.outputs.IMAGE_VERSION }}; do
echo copy catthehacker/ubuntu:full-20.04 -> gitea/runner-images:$dest
skopeo copy -a --dest-creds ${{ secrets.DOCKER_USERNAME }}:${{ secrets.DOCKER_PASSWORD }} docker://ghcr.io/catthehacker/ubuntu:full-20.04 docker://gitea/runner-images:$dest
skopeo copy -a docker://ghcr.io/catthehacker/ubuntu:full-20.04 docker://gitea/runner-images:$dest
done