From c98ec754d1586fc54cdd0742a02ac801272cf760 Mon Sep 17 00:00:00 2001 From: Marcel Stimberg Date: Sun, 4 Aug 2024 12:28:44 +0200 Subject: [PATCH 1/4] Publish docker images to GitHub container registry --- .github/workflows/publish.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 3c36272c3..1f756ef1e 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -181,6 +181,7 @@ jobs: with: images: | briansimulator/brian + ghcr.io/brian-team/brian flavor: latest=true tags: | # type=semver,pattern={{raw}} @@ -205,6 +206,13 @@ jobs: with: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} + - name: Login to GitHub Container Registry + if: ${{ github.repository == 'brian-team/brian2' && github.actor != 'dependabot[bot]'}} + uses: docker/login-action@v3 + with: + registry: ghcr.io + username: ${{ github.repository_owner }} + password: ${{ secrets.GITHUB_TOKEN }} - name: load Linux x86 distribution 📦 uses: actions/download-artifact@v4 with: From fc69559cf127048873303c458184207104c6b2c8 Mon Sep 17 00:00:00 2001 From: Marcel Stimberg Date: Tue, 3 Sep 2024 17:21:05 +0200 Subject: [PATCH 2/4] Build docker image for PRs --- .github/workflows/publish.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 1f756ef1e..41796e484 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -184,8 +184,8 @@ jobs: ghcr.io/brian-team/brian flavor: latest=true tags: | - # type=semver,pattern={{raw}} type=ref,event=tag + type=ref,event=pr labels: | org.opencontainers.image.title="Brian Docker Image" org.opencontainers.image.description="Docker image for Brian - a free, open source simulator for spiking neural networks" From 4be9dc4af8db0b71b9fe2d2f8762ebd1a6a18dbb Mon Sep 17 00:00:00 2001 From: Marcel Stimberg Date: Tue, 3 Sep 2024 21:36:14 +0200 Subject: [PATCH 3/4] Use branch event instead of pr --- .github/workflows/publish.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 41796e484..cee0709a6 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -185,7 +185,7 @@ jobs: flavor: latest=true tags: | type=ref,event=tag - type=ref,event=pr + type=ref,event=branch labels: | org.opencontainers.image.title="Brian Docker Image" org.opencontainers.image.description="Docker image for Brian - a free, open source simulator for spiking neural networks" From 0f7847464c2ae6f42aadd5104283bd5bcb4b2b60 Mon Sep 17 00:00:00 2001 From: Marcel Stimberg Date: Wed, 4 Sep 2024 10:05:34 +0200 Subject: [PATCH 4/4] Manually push dev version to ghcr.io --- .github/workflows/publish.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index cee0709a6..40198a9ce 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -185,7 +185,6 @@ jobs: flavor: latest=true tags: | type=ref,event=tag - type=ref,event=branch labels: | org.opencontainers.image.title="Brian Docker Image" org.opencontainers.image.description="Docker image for Brian - a free, open source simulator for spiking neural networks" @@ -245,5 +244,7 @@ jobs: 'BASE_IMAGE_TAG=3.12-bookworm' platforms: 'amd64,arm64' push: true - tags: briansimulator/brian-dev:dev-${{ github.ref_name }} - labels: ${{ steps.meta.outputs.labels }} + tags: | + briansimulator/brian-dev:dev-${{ github.ref_name }} + ghcr.io/brian-team/brian-dev:dev-${{ github.ref_name }} + labels: ${{ steps.meta.outputs.labels }}