Legacy tags test #2
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Legacy tags tests | |
run-name: Legacy tags test | |
on: | |
pull_request: | |
branches: [master] | |
jobs: | |
docker: | |
name: Docker magic ! | |
runs-on: ubuntu-22.04 | |
env: | |
DOCKERHUB_USER: ${{secrets.DOCKERHUB_USER}} | |
DOCKERHUB_PASSWORD: ${{secrets.DOCKERHUB_PASSWORD}} | |
DOCKERHUB_REPO: ${{secrets.DOCKERHUB_REPO}} | |
steps: | |
- name: 🔑 Login to DockerHub | |
uses: docker/login-action@v2 | |
with: | |
username: ${{ secrets.DOCKERHUB_USER }} | |
password: ${{ secrets.DOCKERHUB_PASSWORD }} | |
- name: 🐳 Legacy Tags | |
run: | | |
export DIGESTARM=$(docker manifest inspect ${{ env.DOCKERHUB_REPO }}:latest | jq -r '.manifests | to_entries[] | select(.value.platform.architecture == "arm" and .value.platform.variant == "v6").value | .digest') | |
docker pull ${{ env.DOCKERHUB_REPO }}@$DIGESTARM | |
docker tag ${{ env.DOCKERHUB_REPO }}@$DIGESTARM ${{ env.DOCKERHUB_REPO }}:v4-arm | |
docker push ${{ env.DOCKERHUB_REPO }}:v4-arm | |
export DIGESTARM64=$(docker manifest inspect ${{ env.DOCKERHUB_REPO }}:latest | jq -r '.manifests | to_entries[] | select(.value.platform.architecture == "arm64").value | .digest') | |
docker pull ${{ env.DOCKERHUB_REPO }}@$DIGESTARM64 | |
docker tag ${{ env.DOCKERHUB_REPO }}@$DIGESTARM64 ${{ env.DOCKERHUB_REPO }}:v4-arm64v8 | |
docker push ${{ env.DOCKERHUB_REPO }}:v4-arm64v8 | |
export DIGESTAMD64=$(docker manifest inspect ${{ env.DOCKERHUB_REPO }}:latest | jq -r '.manifests | to_entries[] | select(.value.platform.architecture == "amd64").value | .digest') | |
docker pull ${{ env.DOCKERHUB_REPO }}@$DIGESTAMD64 | |
docker tag ${{ env.DOCKERHUB_REPO }}@$DIGESTAMD64 ${{ env.DOCKERHUB_REPO }}:v4-amd64 | |
docker push ${{ env.DOCKERHUB_REPO }}:v4-amd64 |