From 4ea1454f516b74f434020dec6ad288eed6fe42b2 Mon Sep 17 00:00:00 2001 From: Cian Hatton Date: Mon, 13 Jun 2022 17:20:11 +0100 Subject: [PATCH 1/5] wip: add docker build push action to release.yml --- .github/workflows/release.yml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 479d90a432e..78d13a41374 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -27,3 +27,12 @@ jobs: args: release --rm-dist env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + - name: Build simd image + uses: docker/build-push-action@v1 + with: + registry: ghcr.io + username: "" + password: "" + repository: cosmos/ibc-go-simd + tags: ${{ github.ref_name }} \ No newline at end of file From 0962615175cc0ad785de1b49773418dc5353be22 Mon Sep 17 00:00:00 2001 From: Cian Hatton Date: Tue, 14 Jun 2022 10:53:10 +0100 Subject: [PATCH 2/5] adding workflow dispatch for simd docker image --- .github/workflows/build-simd.yml | 39 ++++++++++++++++++++++++++++++++ .github/workflows/release.yml | 9 -------- 2 files changed, 39 insertions(+), 9 deletions(-) create mode 100644 .github/workflows/build-simd.yml diff --git a/.github/workflows/build-simd.yml b/.github/workflows/build-simd.yml new file mode 100644 index 00000000000..c6ca90c9575 --- /dev/null +++ b/.github/workflows/build-simd.yml @@ -0,0 +1,39 @@ +name: Create and publish simd Docker image + +on: workflow_dispatch + +env: + REGISTRY: ghcr.io + IMAGE_NAME: ibc-go-simd + +jobs: + build-and-push-image: + runs-on: ubuntu-latest + permissions: + contents: read + packages: write + + steps: + - name: Checkout repository + uses: actions/checkout@v3 + + - name: Log in to the Container registry + uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9 + with: + registry: ${{ env.REGISTRY }} + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Extract metadata (tags, labels) for Docker + id: meta + uses: docker/metadata-action@98669ae865ea3cffbcbaa878cf57c20bbf1c6c38 + with: + images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} + + - name: Build and push Docker image + uses: docker/build-push-action@ad44023a93711e3deb337508980b4b5e9bcdc5dc + with: + context: . + push: true + tags: ${{ steps.meta.outputs.tags }} + labels: ${{ steps.meta.outputs.labels }} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 78d13a41374..479d90a432e 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -27,12 +27,3 @@ jobs: args: release --rm-dist env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - - name: Build simd image - uses: docker/build-push-action@v1 - with: - registry: ghcr.io - username: "" - password: "" - repository: cosmos/ibc-go-simd - tags: ${{ github.ref_name }} \ No newline at end of file From 818a76b11944328e94d371f9a50f7ce6fd287e71 Mon Sep 17 00:00:00 2001 From: Cian Hatton Date: Tue, 14 Jun 2022 10:59:36 +0100 Subject: [PATCH 3/5] wip: added pull_request as workflow trigger --- .github/workflows/build-simd.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-simd.yml b/.github/workflows/build-simd.yml index c6ca90c9575..c38ce92e2a6 100644 --- a/.github/workflows/build-simd.yml +++ b/.github/workflows/build-simd.yml @@ -1,6 +1,6 @@ name: Create and publish simd Docker image -on: workflow_dispatch +on: [workflow_dispatch, pull_request] env: REGISTRY: ghcr.io From b233cb14ffe165d304de4393feca375126a16d38 Mon Sep 17 00:00:00 2001 From: Cian Hatton Date: Tue, 14 Jun 2022 11:04:11 +0100 Subject: [PATCH 4/5] wip: corrected image name --- .github/workflows/build-simd.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-simd.yml b/.github/workflows/build-simd.yml index c38ce92e2a6..0eaf071cf43 100644 --- a/.github/workflows/build-simd.yml +++ b/.github/workflows/build-simd.yml @@ -28,7 +28,7 @@ jobs: id: meta uses: docker/metadata-action@98669ae865ea3cffbcbaa878cf57c20bbf1c6c38 with: - images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} + images: ${{ env.REGISTRY }}/cosmos/${{ env.IMAGE_NAME }} - name: Build and push Docker image uses: docker/build-push-action@ad44023a93711e3deb337508980b4b5e9bcdc5dc From fb5c6a6dc2c919922d40bf6eeb300084675258c0 Mon Sep 17 00:00:00 2001 From: Cian Hatton Date: Tue, 14 Jun 2022 11:14:28 +0100 Subject: [PATCH 5/5] chore: moved the build and push action to release.yml --- .github/workflows/build-simd.yml | 39 -------------------------------- .github/workflows/release.yml | 25 ++++++++++++++++++++ 2 files changed, 25 insertions(+), 39 deletions(-) delete mode 100644 .github/workflows/build-simd.yml diff --git a/.github/workflows/build-simd.yml b/.github/workflows/build-simd.yml deleted file mode 100644 index 0eaf071cf43..00000000000 --- a/.github/workflows/build-simd.yml +++ /dev/null @@ -1,39 +0,0 @@ -name: Create and publish simd Docker image - -on: [workflow_dispatch, pull_request] - -env: - REGISTRY: ghcr.io - IMAGE_NAME: ibc-go-simd - -jobs: - build-and-push-image: - runs-on: ubuntu-latest - permissions: - contents: read - packages: write - - steps: - - name: Checkout repository - uses: actions/checkout@v3 - - - name: Log in to the Container registry - uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9 - with: - registry: ${{ env.REGISTRY }} - username: ${{ github.actor }} - password: ${{ secrets.GITHUB_TOKEN }} - - - name: Extract metadata (tags, labels) for Docker - id: meta - uses: docker/metadata-action@98669ae865ea3cffbcbaa878cf57c20bbf1c6c38 - with: - images: ${{ env.REGISTRY }}/cosmos/${{ env.IMAGE_NAME }} - - - name: Build and push Docker image - uses: docker/build-push-action@ad44023a93711e3deb337508980b4b5e9bcdc5dc - with: - context: . - push: true - tags: ${{ steps.meta.outputs.tags }} - labels: ${{ steps.meta.outputs.labels }} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 479d90a432e..4b42de16645 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -6,6 +6,10 @@ on: - 'v[0-9]+.[0-9]+.[0-9]+' # Push events to matching v*, i.e. v1.0.0, v20.15.10 - 'v[0-9]+.[0-9]+.[0-9]+-?[a-z0-9]+' # Push events to matching v*-[alpha/beta/rc], i.e. v3.0.0-alpha1, v3.0.0-beta1, v3.0.0-rc0 +env: + REGISTRY: ghcr.io + IMAGE_NAME: ibc-go-simd + jobs: goreleaser: runs-on: ubuntu-latest @@ -27,3 +31,24 @@ jobs: args: release --rm-dist env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + - name: Log in to the Container registry + uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9 + with: + registry: ${{ env.REGISTRY }} + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Extract metadata (tags, labels) for Docker + id: meta + uses: docker/metadata-action@98669ae865ea3cffbcbaa878cf57c20bbf1c6c38 + with: + images: ${{ env.REGISTRY }}/cosmos/${{ env.IMAGE_NAME }} + + - name: Build and push Docker image + uses: docker/build-push-action@ad44023a93711e3deb337508980b4b5e9bcdc5dc + with: + context: . + push: true + tags: ${{ steps.meta.outputs.tags }} + labels: ${{ steps.meta.outputs.labels }}