Update Docker login steps to use GitHub actor and package token; remove Docker startup wait
Some checks failed
Build and Push Ansible Container / build-and-push (amd64) (push) Failing after 33s
Build and Push Ansible Container / build-and-push (arm64) (push) Failing after 35s
Build and Push Ansible Container / manifest (push) Has been skipped
Docker-in-Docker CI/CD Pipeline / Build and Push Docker-in-Docker Images (push) Failing after 1m30s
Docker-in-Docker CI/CD Pipeline / Create and Publish Multi-Arch Manifest (push) Has been skipped
Some checks failed
Build and Push Ansible Container / build-and-push (amd64) (push) Failing after 33s
Build and Push Ansible Container / build-and-push (arm64) (push) Failing after 35s
Build and Push Ansible Container / manifest (push) Has been skipped
Docker-in-Docker CI/CD Pipeline / Build and Push Docker-in-Docker Images (push) Failing after 1m30s
Docker-in-Docker CI/CD Pipeline / Create and Publish Multi-Arch Manifest (push) Has been skipped
This commit is contained in:
parent
50f353bfc6
commit
4bbc28cb6f
2 changed files with 9 additions and 19 deletions
|
|
@ -26,19 +26,6 @@ jobs:
|
|||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Wait for Docker to start
|
||||
run: |
|
||||
i=0
|
||||
while ! docker info >/dev/null 2>&1; do
|
||||
i=$((i+1))
|
||||
if [ $i -ge 15 ]; then
|
||||
echo "Docker did not start within 15 seconds"
|
||||
exit 1
|
||||
fi
|
||||
echo "Waiting for Docker to start..."
|
||||
sleep 1
|
||||
done
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v3
|
||||
|
||||
|
|
@ -46,8 +33,8 @@ jobs:
|
|||
uses: docker/login-action@v3
|
||||
with:
|
||||
registry: ${{ vars.REGISTRY }}
|
||||
username: ${{ secrets.CI_REGISTRY_USER }}
|
||||
password: ${{ secrets.FORGEJO_TOKEN }}
|
||||
username: ${{ github.actor }}
|
||||
password: ${{ secrets.PACKAGE_TOKEN }}
|
||||
|
||||
- name: Build and push (${{ matrix.arch }})
|
||||
uses: docker/build-push-action@v5
|
||||
|
|
@ -58,8 +45,6 @@ jobs:
|
|||
push: true
|
||||
tags: |
|
||||
${{ secrets.CI_REGISTRY }}/${{ secrets.CI_REPOSITORY }}/ansible:${{ matrix.arch }}-latest
|
||||
cache-from: type=registry,ref=${{ secrets.CI_REGISTRY }}/${{ secrets.CI_REPOSITORY }}/ansible:buildcache-${{ matrix.arch }}
|
||||
cache-to: type=registry,ref=${{ secrets.CI_REGISTRY }}/${{ secrets.CI_REPOSITORY }}/ansible:buildcache-${{ matrix.arch }},mode=max
|
||||
|
||||
manifest:
|
||||
needs: build-and-push
|
||||
|
|
|
|||
|
|
@ -24,14 +24,17 @@ jobs:
|
|||
steps:
|
||||
- name: Checkout Source Code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Setup Docker Buildx
|
||||
uses: docker/setup-buildx-action@v1
|
||||
|
||||
- name: Login to Forgejo Container Registry
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
registry: ${{ vars.REGISTRY }}
|
||||
username: ${{ secrets.CI_REGISTRY_USER }}
|
||||
password: ${{ secrets.FORGEJO_TOKEN }}
|
||||
username: ${{ github.actor }}
|
||||
password: ${{ secrets.PACKAGE_TOKEN }}
|
||||
|
||||
- name: Build and Push Image for ${{ matrix.arch }}
|
||||
uses: docker/build-push-action@v6
|
||||
with:
|
||||
|
|
@ -61,12 +64,14 @@ jobs:
|
|||
echo "Waiting for Docker to start..."
|
||||
sleep 1
|
||||
done
|
||||
|
||||
- name: Login to Forgejo Container Registry
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
registry: ${{ vars.REGISTRY }}
|
||||
username: ${{ secrets.CI_REGISTRY_USER }}
|
||||
password: ${{ secrets.CI_TOKEN }}
|
||||
|
||||
- name: Create and Push Multi-Arch Manifest
|
||||
run: |
|
||||
docker manifest create ${{ vars.REGISTRY }}/${{ vars.ORGANISATION }}/dockerindocker:latest \
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue