From 1f39b7dfd61828d070ced2ff059cc51be21de9cd Mon Sep 17 00:00:00 2001 From: Dan Cline <6798349+Rjected@users.noreply.github.com> Date: Thu, 12 Sep 2024 15:47:09 -0400 Subject: [PATCH 01/21] feat(ci): add docker image push workflow --- .github/workflows/docker-push.yml | 56 +++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 .github/workflows/docker-push.yml diff --git a/.github/workflows/docker-push.yml b/.github/workflows/docker-push.yml new file mode 100644 index 000000000000..dc8d1c6f0a0c --- /dev/null +++ b/.github/workflows/docker-push.yml @@ -0,0 +1,56 @@ +name: Tag and push all docker + +on: + workflow_dispatch: {} + push: + tags: + - v* + +env: + CARGO_TERM_COLOR: always + DOCKER_USERNAME: ${{ github.actor }} + +jobs: + build: + name: build and push + runs-on: ubuntu-20.04 + permissions: + packages: write + contents: read + steps: + - uses: actions/checkout@v4 + - name: Log in to Docker + run: | + echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io --username ${DOCKER_USERNAME} --password-stdin + - name: Run make golang-docker + run: | + make golang-docker + + # TODO: make this into a matrix + - name: Tag image versions + run: | + docker image tag us-docker.pkg.dev/oplabs-tools-artifacts/images/op-proposer ghcr.io/${{ github.repository_owner }}/op-proposer + docker image tag us-docker.pkg.dev/oplabs-tools-artifacts/images/op-batcher ghcr.io/${{ github.repository_owner }}/op-batcher + docker image tag us-docker.pkg.dev/oplabs-tools-artifacts/images/op-challenger ghcr.io/${{ github.repository_owner }}/op-challenger + docker image tag us-docker.pkg.dev/oplabs-tools-artifacts/images/op-supervisor ghcr.io/${{ github.repository_owner }}/op-supervisor + docker image tag us-docker.pkg.dev/oplabs-tools-artifacts/images/op-node ghcr.io/${{ github.repository_owner }}/op-node + docker image tag us-docker.pkg.dev/oplabs-tools-artifacts/images/op-dispute-mon ghcr.io/${{ github.repository_owner }}/op-dispute-mon + + - name: Tag versions + if: startsWith(github.ref_name, "v") + run: | + docker image tag ghcr.io/${{ github.repository_owner }}/op-challenger ghcr.io/${{ github.repository_owner }}/op-challenger:${{ github.ref_name }} + docker image tag ghcr.io/${{ github.repository_owner }}/op-node ghcr.io/${{ github.repository_owner }}/op-node:${{ github.ref_name }} + docker image tag ghcr.io/${{ github.repository_owner }}/op-dispute-mon ghcr.io/${{ github.repository_owner }}/op-dispute-mon:${{ github.ref_name }} + docker image tag ghcr.io/${{ github.repository_owner }}/op-proposer ghcr.io/${{ github.repository_owner }}/op-proposer:${{ github.ref_name }} + docker image tag ghcr.io/${{ github.repository_owner }}/op-batcher ghcr.io/${{ github.repository_owner }}/op-batcher:${{ github.ref_name }} + docker image tag ghcr.io/${{ github.repository_owner }}/op-supervisor ghcr.io/${{ github.repository_owner }}/op-supervisor:${{ github.ref_name }} + + - name: Push images + run: | + docker image push -a ghcr.io/${{ github.repository_owner }}/op-challenger + docker image push -a ghcr.io/${{ github.repository_owner }}/op-node + docker image push -a ghcr.io/${{ github.repository_owner }}/op-dispute-mon + docker image push -a ghcr.io/${{ github.repository_owner }}/op-proposer + docker image push -a ghcr.io/${{ github.repository_owner }}/op-batcher + docker image push -a ghcr.io/${{ github.repository_owner }}/op-supervisor From 0fae31561e03df322f16c26685dd9768b0532f36 Mon Sep 17 00:00:00 2001 From: Dan Cline <6798349+Rjected@users.noreply.github.com> Date: Thu, 12 Sep 2024 15:48:37 -0400 Subject: [PATCH 02/21] add pull_request for testing --- .github/workflows/docker-push.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/docker-push.yml b/.github/workflows/docker-push.yml index dc8d1c6f0a0c..d6f93c89ac06 100644 --- a/.github/workflows/docker-push.yml +++ b/.github/workflows/docker-push.yml @@ -2,6 +2,7 @@ name: Tag and push all docker on: workflow_dispatch: {} + pull_request: push: tags: - v* From fca540842d2066d538daed66724b773ca7da5c9a Mon Sep 17 00:00:00 2001 From: Dan Cline <6798349+Rjected@users.noreply.github.com> Date: Thu, 12 Sep 2024 15:51:18 -0400 Subject: [PATCH 03/21] add working startsWith --- .github/workflows/docker-push.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/docker-push.yml b/.github/workflows/docker-push.yml index d6f93c89ac06..0e9a02e58eb8 100644 --- a/.github/workflows/docker-push.yml +++ b/.github/workflows/docker-push.yml @@ -38,7 +38,7 @@ jobs: docker image tag us-docker.pkg.dev/oplabs-tools-artifacts/images/op-dispute-mon ghcr.io/${{ github.repository_owner }}/op-dispute-mon - name: Tag versions - if: startsWith(github.ref_name, "v") + if: ${{ startsWith(github.ref, 'refs/tags/') }} run: | docker image tag ghcr.io/${{ github.repository_owner }}/op-challenger ghcr.io/${{ github.repository_owner }}/op-challenger:${{ github.ref_name }} docker image tag ghcr.io/${{ github.repository_owner }}/op-node ghcr.io/${{ github.repository_owner }}/op-node:${{ github.ref_name }} From 502f5dbb6e4dd4b1b61d45f606fbac5a4901f796 Mon Sep 17 00:00:00 2001 From: Dan Cline <6798349+Rjected@users.noreply.github.com> Date: Thu, 12 Sep 2024 15:51:41 -0400 Subject: [PATCH 04/21] dont push for now --- .github/workflows/docker-push.yml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/docker-push.yml b/.github/workflows/docker-push.yml index 0e9a02e58eb8..f8a58f2688a2 100644 --- a/.github/workflows/docker-push.yml +++ b/.github/workflows/docker-push.yml @@ -47,11 +47,11 @@ jobs: docker image tag ghcr.io/${{ github.repository_owner }}/op-batcher ghcr.io/${{ github.repository_owner }}/op-batcher:${{ github.ref_name }} docker image tag ghcr.io/${{ github.repository_owner }}/op-supervisor ghcr.io/${{ github.repository_owner }}/op-supervisor:${{ github.ref_name }} - - name: Push images - run: | - docker image push -a ghcr.io/${{ github.repository_owner }}/op-challenger - docker image push -a ghcr.io/${{ github.repository_owner }}/op-node - docker image push -a ghcr.io/${{ github.repository_owner }}/op-dispute-mon - docker image push -a ghcr.io/${{ github.repository_owner }}/op-proposer - docker image push -a ghcr.io/${{ github.repository_owner }}/op-batcher - docker image push -a ghcr.io/${{ github.repository_owner }}/op-supervisor + # - name: Push images + # run: | + # docker image push -a ghcr.io/${{ github.repository_owner }}/op-challenger + # docker image push -a ghcr.io/${{ github.repository_owner }}/op-node + # docker image push -a ghcr.io/${{ github.repository_owner }}/op-dispute-mon + # docker image push -a ghcr.io/${{ github.repository_owner }}/op-proposer + # docker image push -a ghcr.io/${{ github.repository_owner }}/op-batcher + # docker image push -a ghcr.io/${{ github.repository_owner }}/op-supervisor From 18fdec32f4dc59ce7d7920f0322f35595162edb9 Mon Sep 17 00:00:00 2001 From: Dan Cline <6798349+Rjected@users.noreply.github.com> Date: Thu, 12 Sep 2024 16:00:19 -0400 Subject: [PATCH 05/21] use matrix --- .github/workflows/docker-push.yml | 39 +++++++++++++------------------ 1 file changed, 16 insertions(+), 23 deletions(-) diff --git a/.github/workflows/docker-push.yml b/.github/workflows/docker-push.yml index f8a58f2688a2..9f7307737d72 100644 --- a/.github/workflows/docker-push.yml +++ b/.github/workflows/docker-push.yml @@ -13,45 +13,38 @@ env: jobs: build: - name: build and push + name: Build all images runs-on: ubuntu-20.04 permissions: packages: write contents: read steps: - uses: actions/checkout@v4 - - name: Log in to Docker - run: | - echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io --username ${DOCKER_USERNAME} --password-stdin - name: Run make golang-docker run: | make golang-docker - # TODO: make this into a matrix + push: + name: Tag and push all images + needs: build + strategy: + matrix: + image: [op-node, op-batcher, op-proposer, op-challenger, op-supervisor, op-dispute-mon] + permissions: + packages: write + contents: read + - name: Log in to Docker + run: | + echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io --username ${DOCKER_USERNAME} --password-stdin - name: Tag image versions run: | - docker image tag us-docker.pkg.dev/oplabs-tools-artifacts/images/op-proposer ghcr.io/${{ github.repository_owner }}/op-proposer - docker image tag us-docker.pkg.dev/oplabs-tools-artifacts/images/op-batcher ghcr.io/${{ github.repository_owner }}/op-batcher - docker image tag us-docker.pkg.dev/oplabs-tools-artifacts/images/op-challenger ghcr.io/${{ github.repository_owner }}/op-challenger - docker image tag us-docker.pkg.dev/oplabs-tools-artifacts/images/op-supervisor ghcr.io/${{ github.repository_owner }}/op-supervisor - docker image tag us-docker.pkg.dev/oplabs-tools-artifacts/images/op-node ghcr.io/${{ github.repository_owner }}/op-node - docker image tag us-docker.pkg.dev/oplabs-tools-artifacts/images/op-dispute-mon ghcr.io/${{ github.repository_owner }}/op-dispute-mon + docker image tag us-docker.pkg.dev/oplabs-tools-artifacts/images/${{ matrix.image }} ghcr.io/${{ github.repository_owner }}/${{ matrix.image }} - name: Tag versions if: ${{ startsWith(github.ref, 'refs/tags/') }} run: | - docker image tag ghcr.io/${{ github.repository_owner }}/op-challenger ghcr.io/${{ github.repository_owner }}/op-challenger:${{ github.ref_name }} - docker image tag ghcr.io/${{ github.repository_owner }}/op-node ghcr.io/${{ github.repository_owner }}/op-node:${{ github.ref_name }} - docker image tag ghcr.io/${{ github.repository_owner }}/op-dispute-mon ghcr.io/${{ github.repository_owner }}/op-dispute-mon:${{ github.ref_name }} - docker image tag ghcr.io/${{ github.repository_owner }}/op-proposer ghcr.io/${{ github.repository_owner }}/op-proposer:${{ github.ref_name }} - docker image tag ghcr.io/${{ github.repository_owner }}/op-batcher ghcr.io/${{ github.repository_owner }}/op-batcher:${{ github.ref_name }} - docker image tag ghcr.io/${{ github.repository_owner }}/op-supervisor ghcr.io/${{ github.repository_owner }}/op-supervisor:${{ github.ref_name }} + docker image tag ghcr.io/${{ github.repository_owner }}/${{ matrix.image }} ghcr.io/${{ github.repository_owner }}/${{ matrix.image }}:${{ github.ref_name }} # - name: Push images # run: | - # docker image push -a ghcr.io/${{ github.repository_owner }}/op-challenger - # docker image push -a ghcr.io/${{ github.repository_owner }}/op-node - # docker image push -a ghcr.io/${{ github.repository_owner }}/op-dispute-mon - # docker image push -a ghcr.io/${{ github.repository_owner }}/op-proposer - # docker image push -a ghcr.io/${{ github.repository_owner }}/op-batcher - # docker image push -a ghcr.io/${{ github.repository_owner }}/op-supervisor + # docker image push -a ghcr.io/${{ github.repository_owner }}/${{ matrix.image }} From 18859308c9cae95863db68449ab23bcca4f1347c Mon Sep 17 00:00:00 2001 From: Dan Cline <6798349+Rjected@users.noreply.github.com> Date: Thu, 12 Sep 2024 16:02:36 -0400 Subject: [PATCH 06/21] oops --- .github/workflows/docker-push.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/docker-push.yml b/.github/workflows/docker-push.yml index 9f7307737d72..5a33041b35d4 100644 --- a/.github/workflows/docker-push.yml +++ b/.github/workflows/docker-push.yml @@ -33,6 +33,7 @@ jobs: permissions: packages: write contents: read + steps: - name: Log in to Docker run: | echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io --username ${DOCKER_USERNAME} --password-stdin From e5a3da73d35c33b306795d3089557b88b5c46a48 Mon Sep 17 00:00:00 2001 From: Dan Cline <6798349+Rjected@users.noreply.github.com> Date: Thu, 12 Sep 2024 16:02:55 -0400 Subject: [PATCH 07/21] remove perms on build --- .github/workflows/docker-push.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/workflows/docker-push.yml b/.github/workflows/docker-push.yml index 5a33041b35d4..9a2c4537504e 100644 --- a/.github/workflows/docker-push.yml +++ b/.github/workflows/docker-push.yml @@ -15,9 +15,6 @@ jobs: build: name: Build all images runs-on: ubuntu-20.04 - permissions: - packages: write - contents: read steps: - uses: actions/checkout@v4 - name: Run make golang-docker From 01f389d0a12c1d0588c52ea64d802eb96698d1aa Mon Sep 17 00:00:00 2001 From: Dan Cline <6798349+Rjected@users.noreply.github.com> Date: Thu, 12 Sep 2024 16:03:38 -0400 Subject: [PATCH 08/21] more required stuff --- .github/workflows/docker-push.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/docker-push.yml b/.github/workflows/docker-push.yml index 9a2c4537504e..20c5b2cd2d8d 100644 --- a/.github/workflows/docker-push.yml +++ b/.github/workflows/docker-push.yml @@ -23,6 +23,7 @@ jobs: push: name: Tag and push all images + runs-on: ubuntu-20.04 needs: build strategy: matrix: From eb31acbb75641ec67eba4d643d47300b84ee24eb Mon Sep 17 00:00:00 2001 From: Dan Cline <6798349+Rjected@users.noreply.github.com> Date: Wed, 18 Sep 2024 15:39:13 -0400 Subject: [PATCH 09/21] try to use artifacts --- .github/workflows/docker-push.yml | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/.github/workflows/docker-push.yml b/.github/workflows/docker-push.yml index 20c5b2cd2d8d..bb3bf897853c 100644 --- a/.github/workflows/docker-push.yml +++ b/.github/workflows/docker-push.yml @@ -15,12 +15,25 @@ jobs: build: name: Build all images runs-on: ubuntu-20.04 + permissions: + packages: write + contents: read steps: - uses: actions/checkout@v4 - name: Run make golang-docker run: | make golang-docker + - name: Put all docker images in temp dir + run: | + docker image ls | grep 'us-.*oplabs.*latest' | sed 's/latest.*//' | xargs -L1 -I % echo 'docker image save % -o /tmp/%.tar' | sed 's:/tmp/.*/\(.*\.tar\):/tmp/\1:' | bash + + - name: Upload artifact + uses: actions/upload-artifact@v4 + with: + name: op-images + path: /tmp/op-*.tar + push: name: Tag and push all images runs-on: ubuntu-20.04 @@ -32,6 +45,15 @@ jobs: packages: write contents: read steps: + - name: Download built artifact + uses: actions/download-artifact@v4 + with: + name: op-images + path: ${{ matrix.image }}.tar + + - name: Import image + run | docker image import ${{ matrix.image }}.tar + - name: Log in to Docker run: | echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io --username ${DOCKER_USERNAME} --password-stdin From 537778b72bb6db2331c6014af699037e390585d8 Mon Sep 17 00:00:00 2001 From: Dan Cline <6798349+Rjected@users.noreply.github.com> Date: Wed, 18 Sep 2024 15:41:36 -0400 Subject: [PATCH 10/21] fix --- .github/workflows/docker-push.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/docker-push.yml b/.github/workflows/docker-push.yml index bb3bf897853c..f2962a41aa08 100644 --- a/.github/workflows/docker-push.yml +++ b/.github/workflows/docker-push.yml @@ -52,7 +52,7 @@ jobs: path: ${{ matrix.image }}.tar - name: Import image - run | docker image import ${{ matrix.image }}.tar + run: | docker image import ${{ matrix.image }}.tar - name: Log in to Docker run: | From 5ae2e7ee62732ec1a5f544531f6f820fa0175bc9 Mon Sep 17 00:00:00 2001 From: Dan Cline <6798349+Rjected@users.noreply.github.com> Date: Wed, 18 Sep 2024 15:42:58 -0400 Subject: [PATCH 11/21] fix --- .github/workflows/docker-push.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/docker-push.yml b/.github/workflows/docker-push.yml index f2962a41aa08..bc234614a775 100644 --- a/.github/workflows/docker-push.yml +++ b/.github/workflows/docker-push.yml @@ -52,7 +52,8 @@ jobs: path: ${{ matrix.image }}.tar - name: Import image - run: | docker image import ${{ matrix.image }}.tar + run: | + docker image import ${{ matrix.image }}.tar - name: Log in to Docker run: | From b3c1d73d8cacbaa40fe7c65a2f7563d541145514 Mon Sep 17 00:00:00 2001 From: Dan Cline <6798349+Rjected@users.noreply.github.com> Date: Wed, 18 Sep 2024 15:50:08 -0400 Subject: [PATCH 12/21] just print the commands --- .github/workflows/docker-push.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/docker-push.yml b/.github/workflows/docker-push.yml index bc234614a775..b9d1d36e6bfd 100644 --- a/.github/workflows/docker-push.yml +++ b/.github/workflows/docker-push.yml @@ -26,7 +26,7 @@ jobs: - name: Put all docker images in temp dir run: | - docker image ls | grep 'us-.*oplabs.*latest' | sed 's/latest.*//' | xargs -L1 -I % echo 'docker image save % -o /tmp/%.tar' | sed 's:/tmp/.*/\(.*\.tar\):/tmp/\1:' | bash + docker image ls | grep 'us-.*oplabs.*latest' | sed 's/latest.*//' | xargs -L1 -I % echo 'docker image save % -o /tmp/%.tar' | sed 's:/tmp/.*/\(.*\.tar\):/tmp/\1:' - name: Upload artifact uses: actions/upload-artifact@v4 From 54f0d7553ca820e69a09703c4f7d712095492f4f Mon Sep 17 00:00:00 2001 From: Dan Cline <6798349+Rjected@users.noreply.github.com> Date: Wed, 18 Sep 2024 16:07:12 -0400 Subject: [PATCH 13/21] remove spaces --- .github/workflows/docker-push.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/docker-push.yml b/.github/workflows/docker-push.yml index b9d1d36e6bfd..ba8f5d8f8607 100644 --- a/.github/workflows/docker-push.yml +++ b/.github/workflows/docker-push.yml @@ -26,7 +26,7 @@ jobs: - name: Put all docker images in temp dir run: | - docker image ls | grep 'us-.*oplabs.*latest' | sed 's/latest.*//' | xargs -L1 -I % echo 'docker image save % -o /tmp/%.tar' | sed 's:/tmp/.*/\(.*\.tar\):/tmp/\1:' + docker image ls | grep 'us-.*oplabs.*latest' | sed 's/( )*latest.*//' | xargs -L1 -I % echo 'docker image save % -o /tmp/%.tar' | sed 's:/tmp/.*/\(.*\.tar\):/tmp/\1:' - name: Upload artifact uses: actions/upload-artifact@v4 From 3aa90c256eba56da80ca2fb0cc59614766415a04 Mon Sep 17 00:00:00 2001 From: Dan Cline <6798349+Rjected@users.noreply.github.com> Date: Wed, 18 Sep 2024 16:47:54 -0400 Subject: [PATCH 14/21] spaces --- .github/workflows/docker-push.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/docker-push.yml b/.github/workflows/docker-push.yml index ba8f5d8f8607..631ae55b602b 100644 --- a/.github/workflows/docker-push.yml +++ b/.github/workflows/docker-push.yml @@ -26,7 +26,7 @@ jobs: - name: Put all docker images in temp dir run: | - docker image ls | grep 'us-.*oplabs.*latest' | sed 's/( )*latest.*//' | xargs -L1 -I % echo 'docker image save % -o /tmp/%.tar' | sed 's:/tmp/.*/\(.*\.tar\):/tmp/\1:' + docker image ls | grep 'us-.*oplabs.*latest' | sed 's/ *latest.*//' | xargs -L1 -I % echo 'docker image save % -o /tmp/%.tar' | sed 's:/tmp/.*/\(.*\.tar\):/tmp/\1:' - name: Upload artifact uses: actions/upload-artifact@v4 From ed48bbb15ff2406a7a7a85d23ed0958a10de0d47 Mon Sep 17 00:00:00 2001 From: Dan Cline <6798349+Rjected@users.noreply.github.com> Date: Wed, 18 Sep 2024 16:53:41 -0400 Subject: [PATCH 15/21] bash --- .github/workflows/docker-push.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/docker-push.yml b/.github/workflows/docker-push.yml index 631ae55b602b..c6e90d90c8b8 100644 --- a/.github/workflows/docker-push.yml +++ b/.github/workflows/docker-push.yml @@ -26,7 +26,7 @@ jobs: - name: Put all docker images in temp dir run: | - docker image ls | grep 'us-.*oplabs.*latest' | sed 's/ *latest.*//' | xargs -L1 -I % echo 'docker image save % -o /tmp/%.tar' | sed 's:/tmp/.*/\(.*\.tar\):/tmp/\1:' + docker image ls | grep 'us-.*oplabs.*latest' | sed 's/ *latest.*//' | xargs -L1 -I % echo 'docker image save % -o /tmp/%.tar' | sed 's:/tmp/.*/\(.*\.tar\):/tmp/\1:' | bash - name: Upload artifact uses: actions/upload-artifact@v4 From fa6f6994e6bb1d8235c83e8b514192749f6a46de Mon Sep 17 00:00:00 2001 From: Dan Cline <6798349+Rjected@users.noreply.github.com> Date: Wed, 18 Sep 2024 17:02:36 -0400 Subject: [PATCH 16/21] fix op-images stuff --- .github/workflows/docker-push.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/docker-push.yml b/.github/workflows/docker-push.yml index c6e90d90c8b8..2813d9962901 100644 --- a/.github/workflows/docker-push.yml +++ b/.github/workflows/docker-push.yml @@ -49,11 +49,11 @@ jobs: uses: actions/download-artifact@v4 with: name: op-images - path: ${{ matrix.image }}.tar + path: op-images - name: Import image run: | - docker image import ${{ matrix.image }}.tar + docker image import op-images/${{ matrix.image }}.tar - name: Log in to Docker run: | From eefbaafea3eabf0e358fd39562eac7cfb03db90f Mon Sep 17 00:00:00 2001 From: Dan Cline <6798349+Rjected@users.noreply.github.com> Date: Wed, 25 Sep 2024 14:39:33 -0400 Subject: [PATCH 17/21] use just the image --- .github/workflows/docker-push.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/docker-push.yml b/.github/workflows/docker-push.yml index 2813d9962901..395df4f0c000 100644 --- a/.github/workflows/docker-push.yml +++ b/.github/workflows/docker-push.yml @@ -60,7 +60,7 @@ jobs: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io --username ${DOCKER_USERNAME} --password-stdin - name: Tag image versions run: | - docker image tag us-docker.pkg.dev/oplabs-tools-artifacts/images/${{ matrix.image }} ghcr.io/${{ github.repository_owner }}/${{ matrix.image }} + docker image tag ${{ matrix.image }} ghcr.io/${{ github.repository_owner }}/${{ matrix.image }} - name: Tag versions if: ${{ startsWith(github.ref, 'refs/tags/') }} From 9020fdab648bd57de82db5986da1620ec23f9b62 Mon Sep 17 00:00:00 2001 From: Dan Cline <6798349+Rjected@users.noreply.github.com> Date: Wed, 25 Sep 2024 15:03:11 -0400 Subject: [PATCH 18/21] try using docker load --- .github/workflows/docker-push.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/docker-push.yml b/.github/workflows/docker-push.yml index 395df4f0c000..5757be042d16 100644 --- a/.github/workflows/docker-push.yml +++ b/.github/workflows/docker-push.yml @@ -53,7 +53,7 @@ jobs: - name: Import image run: | - docker image import op-images/${{ matrix.image }}.tar + docker image load op-images/${{ matrix.image }}.tar - name: Log in to Docker run: | From 466cebbfb1d03105a344b4943afdc89208af7aad Mon Sep 17 00:00:00 2001 From: Dan Cline <6798349+Rjected@users.noreply.github.com> Date: Wed, 25 Sep 2024 15:08:42 -0400 Subject: [PATCH 19/21] try using docker load again --- .github/workflows/docker-push.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/docker-push.yml b/.github/workflows/docker-push.yml index 5757be042d16..e04e73cfdfa2 100644 --- a/.github/workflows/docker-push.yml +++ b/.github/workflows/docker-push.yml @@ -53,7 +53,7 @@ jobs: - name: Import image run: | - docker image load op-images/${{ matrix.image }}.tar + docker image load --input op-images/${{ matrix.image }}.tar - name: Log in to Docker run: | From 602f6bd3aa69064380ea9d55a1578717b5a44aec Mon Sep 17 00:00:00 2001 From: Dan Cline <6798349+Rjected@users.noreply.github.com> Date: Wed, 25 Sep 2024 15:17:56 -0400 Subject: [PATCH 20/21] pls work --- .github/workflows/docker-push.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/docker-push.yml b/.github/workflows/docker-push.yml index e04e73cfdfa2..0e4754c92bfc 100644 --- a/.github/workflows/docker-push.yml +++ b/.github/workflows/docker-push.yml @@ -60,7 +60,7 @@ jobs: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io --username ${DOCKER_USERNAME} --password-stdin - name: Tag image versions run: | - docker image tag ${{ matrix.image }} ghcr.io/${{ github.repository_owner }}/${{ matrix.image }} + docker image tag us-docker.pkg.dev/oplabs-tools-artifacts/images/${{ matrix.image }} ghcr.io/${{ github.repository_owner }}/${{ matrix.image }} - name: Tag versions if: ${{ startsWith(github.ref, 'refs/tags/') }} From 51315eea08652ab562bfda49f4c8df138885c002 Mon Sep 17 00:00:00 2001 From: Dan Cline <6798349+Rjected@users.noreply.github.com> Date: Wed, 25 Sep 2024 15:24:27 -0400 Subject: [PATCH 21/21] finally it works --- .github/workflows/docker-push.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/docker-push.yml b/.github/workflows/docker-push.yml index 0e4754c92bfc..a12214c1c81b 100644 --- a/.github/workflows/docker-push.yml +++ b/.github/workflows/docker-push.yml @@ -2,7 +2,6 @@ name: Tag and push all docker on: workflow_dispatch: {} - pull_request: push: tags: - v* @@ -58,6 +57,7 @@ jobs: - name: Log in to Docker run: | echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io --username ${DOCKER_USERNAME} --password-stdin + - name: Tag image versions run: | docker image tag us-docker.pkg.dev/oplabs-tools-artifacts/images/${{ matrix.image }} ghcr.io/${{ github.repository_owner }}/${{ matrix.image }} @@ -67,6 +67,6 @@ jobs: run: | docker image tag ghcr.io/${{ github.repository_owner }}/${{ matrix.image }} ghcr.io/${{ github.repository_owner }}/${{ matrix.image }}:${{ github.ref_name }} - # - name: Push images - # run: | - # docker image push -a ghcr.io/${{ github.repository_owner }}/${{ matrix.image }} + - name: Push images + run: | + docker image push -a ghcr.io/${{ github.repository_owner }}/${{ matrix.image }}