From 14ad2d8eada0fa4d1c921b8fd4695b2b366877f9 Mon Sep 17 00:00:00 2001 From: Benjamin Harder Date: Fri, 29 Mar 2024 20:55:45 +0100 Subject: [PATCH] Giving up on the autodelete of dangling images... best shot is a fix to this: https://github.com/actions/delete-package-versions/issues/90 --- .github/workflows/main-multi.yml | 112 ------------------------------ .github/workflows/main-multiX.yml | 63 ----------------- 2 files changed, 175 deletions(-) delete mode 100644 .github/workflows/main-multi.yml delete mode 100644 .github/workflows/main-multiX.yml diff --git a/.github/workflows/main-multi.yml b/.github/workflows/main-multi.yml deleted file mode 100644 index ce76054..0000000 --- a/.github/workflows/main-multi.yml +++ /dev/null @@ -1,112 +0,0 @@ -name: Test for creating multi arch packages without buildx - -on: - # push: - # branches: [ "main" ] - # paths: - # - '**/*' - # - '!README.md' - # - '!CONTRIBUTE.md' - workflow_dispatch: - - -jobs: - build-main: - runs-on: ubuntu-latest - defaults: - run: - working-directory: '.' - steps: - - name: 'Checkout GitHub Action' - uses: actions/checkout@main - - - name: 'Login to GitHub Container Registry' - uses: docker/login-action@v1 - with: - registry: ghcr.io - username: ${{github.actor}} - password: ${{secrets.GITHUB_TOKEN}} - - - name: Store short Commit ID in env variable - id: vars - run: | - calculatedSha=$(git rev-parse --short ${{ github.sha }}) - echo "SHORT_COMMIT_ID=$calculatedSha" >> $GITHUB_ENV - - - name: "Build, Tag, and push the Docker image" - env: - IMAGE_NAME: ghcr.io/manimatter/decluttarr - IMAGE_TAG: maintest - run: | - # Build the amd64 image - docker build \ - --progress plain \ - -t $IMAGE_NAME:$IMAGE_TAG-amd64 \ - --label com.decluttarr.version=$IMAGE_TAG-amd64 \ - --label com.decluttarr.commit=$SHORT_COMMIT_ID \ - --build-arg ARCH=amd64 \ - --build-arg IMAGE_TAG=$IMAGE_TAG-amd64 \ - --build-arg SHORT_COMMIT_ID=$SHORT_COMMIT_ID \ - -f docker/Dockerfile \ - --push . - - # Build the arm64 image - docker build \ - --progress plain \ - -t $IMAGE_NAME:$IMAGE_TAG-arm64 \ - --label com.decluttarr.version=$IMAGE_TAG-arm64 \ - --label com.decluttarr.commit=$SHORT_COMMIT_ID \ - --build-arg ARCH=arm64 \ - --build-arg IMAGE_TAG=$IMAGE_TAG-arm64 \ - --build-arg SHORT_COMMIT_ID=$SHORT_COMMIT_ID \ - -f docker/Dockerfile \ - --push . - - # Create and push the manifest list - docker manifest create $IMAGE_NAME:$IMAGE_TAG $IMAGE_NAME:$IMAGE_TAG-amd64 $IMAGE_NAME:$IMAGE_TAG-arm64 - docker manifest annotate $IMAGE_NAME:$IMAGE_TAG $IMAGE_NAME:$IMAGE_TAG-arm64 --os linux --arch arm64 - docker manifest annotate $IMAGE_NAME:$IMAGE_TAG $IMAGE_NAME:$IMAGE_TAG-amd64 --os linux --arch amd64 - docker manifest push $IMAGE_NAME:$IMAGE_TAG - - - -# $ docker buildx create --use --name mybuild node-amd64 -# mybuild -# $ docker buildx create --append --name mybuild node-arm64 -# $ docker buildx build --platform linux/amd64,linux/arm64 . - - - # run: | - # docker buildx build \ - # --platform linux/amd64,linux/arm64 -f docker/Dockerfile . \ - # --progress plain \ - # -t $IMAGE_NAME:$IMAGE_TAG \ - # --label com.decluttarr.version=$IMAGE_TAG \ - # --label com.decluttarr.commit=$SHORT_COMMIT_ID \ - # --build-arg IMAGE_TAG=$IMAGE_TAG \ - # --build-arg SHORT_COMMIT_ID=$SHORT_COMMIT_ID \ - # --push \ - - # - name: "Build, Tag, and push the Docker image" - # env: - # IMAGE_NAME: ghcr.io/manimatter/decluttarr - # IMAGE_TAG: dev - # run: | - # docker build \ - # --progress plain \ - # -t $IMAGE_NAME:$IMAGE_TAG \ - # --label com.decluttarr.version=$IMAGE_TAG \ - # --label com.decluttarr.commit=$SHORT_COMMIT_ID \ - # --build-arg IMAGE_TAG=$IMAGE_TAG \ - # --build-arg SHORT_COMMIT_ID=$SHORT_COMMIT_ID \ - # -f docker/Dockerfile \ - # --push . - - - - # - name: "Delete untagged versions" - # uses: actions/delete-package-versions@v4 - # with: - # package-name: 'decluttarr' - # package-type: 'container' - # delete-only-untagged-versions: 'true' diff --git a/.github/workflows/main-multiX.yml b/.github/workflows/main-multiX.yml deleted file mode 100644 index 96e0300..0000000 --- a/.github/workflows/main-multiX.yml +++ /dev/null @@ -1,63 +0,0 @@ -name: BUILDX TEST - -on: - push: - branches: [ "main" ] - paths: - - '**/*' - - '!README.md' - - '!CONTRIBUTE.md' - workflow_dispatch: - - -jobs: - build-main: - runs-on: ubuntu-latest - - defaults: - run: - working-directory: '.' - - env: - IMAGE_NAME: ghcr.io/manimatter/decluttarr - IMAGE_TAG: maintestX - - steps: - - name: 'Checkout GitHub Action' - uses: actions/checkout@main - - - name: Set up QEMU - uses: docker/setup-qemu-action@v3 - - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v3 - - - name: 'Login to GitHub Container Registry' - uses: docker/login-action@v1 - with: - registry: ghcr.io - username: ${{github.actor}} - password: ${{secrets.GITHUB_TOKEN}} - - - name: Store short Commit ID in env variable - id: vars - run: | - calculatedSha=$(git rev-parse --short ${{ github.sha }}) - echo "SHORT_COMMIT_ID=$calculatedSha" >> $GITHUB_ENV - - - name: "Build, Tag, and push the Docker image" - run: | - docker buildx build \ - --platform linux/amd64 \ - -f docker/Dockerfile . \ - --progress plain \ - -t $IMAGE_NAME:$IMAGE_TAG \ - --label com.decluttarr.version=$IMAGE_TAG \ - --label com.decluttarr.commit=$SHORT_COMMIT_ID \ - --build-arg IMAGE_TAG=$IMAGE_TAG \ - --build-arg SHORT_COMMIT_ID=$SHORT_COMMIT_ID \ - --push \ - - - - \ No newline at end of file