From 9c12365bfafe40ce9b017c5553e582d8bc1c50c2 Mon Sep 17 00:00:00 2001 From: Rootul P Date: Wed, 2 Oct 2024 12:36:01 -0400 Subject: [PATCH] fix: Docker publishing for `-mocha` and `-arabica` tags on v2.x (#3939) Part of https://github.com/celestiaorg/celestia-app/issues/3934. Backports https://github.com/celestiaorg/celestia-app/pull/3908 and https://github.com/celestiaorg/celestia-app/pull/3915 to v2.x. --- .github/workflows/ci-release.yml | 7 ++----- .github/workflows/docker-build-publish.yml | 23 ++++++++++++---------- .github/workflows/lint.yml | 4 +++- Makefile | 2 +- Dockerfile => docker/Dockerfile | 0 5 files changed, 19 insertions(+), 17 deletions(-) rename Dockerfile => docker/Dockerfile (100%) diff --git a/.github/workflows/ci-release.yml b/.github/workflows/ci-release.yml index f4bbe29713..5fe828d636 100644 --- a/.github/workflows/ci-release.yml +++ b/.github/workflows/ci-release.yml @@ -6,12 +6,9 @@ on: push: branches: - main - - "v[0-9]+.x" + - "v*" tags: - - "v[0-9]+.[0-9]+.[0-9]+" - - "v[0-9]+.[0-9]+.[0-9]+-alpha.[0-9]+" - - "v[0-9]+.[0-9]+.[0-9]+-beta.[0-9]+" - - "v[0-9]+.[0-9]+.[0-9]+-rc[0-9]+" + - "v*" pull_request: jobs: diff --git a/.github/workflows/docker-build-publish.yml b/.github/workflows/docker-build-publish.yml index f805f343dd..56837aad64 100644 --- a/.github/workflows/docker-build-publish.yml +++ b/.github/workflows/docker-build-publish.yml @@ -5,32 +5,35 @@ on: push: branches: - "main" - - "v[0-9].[0-9].x" - - "v[0-9].[0-9][0-9].x" - - "v[0-9].x" + - "v*" tags: - - "v[0-9]+.[0-9]+.[0-9]+" - - "v[0-9]+.[0-9]+.[0-9]+-alpha.[0-9]+" - - "v[0-9]+.[0-9]+.[0-9]+-beta.[0-9]+" - - "v[0-9]+.[0-9]+.[0-9]+-rc[0-9]+" + - "v*" pull_request: + workflow_dispatch: + inputs: + ref: + description: "The checkout reference (ie tag, branch, sha)" + required: true + type: string jobs: docker-security-build: permissions: contents: write packages: write - uses: celestiaorg/.github/.github/workflows/reusable_dockerfile_pipeline.yml@v0.4.3 + uses: celestiaorg/.github/.github/workflows/reusable_dockerfile_pipeline.yml@v0.4.5 with: - dockerfile: Dockerfile + dockerfile: docker/Dockerfile + checkout_ref: ${{ github.event.inputs.ref }} secrets: inherit docker-txsim-build: permissions: contents: write packages: write - uses: celestiaorg/.github/.github/workflows/reusable_dockerfile_pipeline.yml@v0.4.3 + uses: celestiaorg/.github/.github/workflows/reusable_dockerfile_pipeline.yml@v0.4.5 with: dockerfile: docker/Dockerfile_txsim packageName: txsim + checkout_ref: ${{ github.event.inputs.ref }} secrets: inherit diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 5987d714f4..fd7cb4c572 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -29,7 +29,9 @@ jobs: # hadolint lints the Dockerfile hadolint: - uses: celestiaorg/.github/.github/workflows/reusable_dockerfile_lint.yml@v0.4.3 + uses: celestiaorg/.github/.github/workflows/reusable_dockerfile_lint.yml@v0.4.5 + with: + dockerfile: "docker/Dockerfile" yamllint: runs-on: ubuntu-latest diff --git a/Makefile b/Makefile index c29e518951..8b5c5196ef 100644 --- a/Makefile +++ b/Makefile @@ -102,7 +102,7 @@ lint: @echo "--> Running markdownlint" @markdownlint --config .markdownlint.yaml '**/*.md' @echo "--> Running hadolint" - @hadolint Dockerfile + @hadolint docker/Dockerfile docker/Dockerfile_txsim @echo "--> Running yamllint" @yamllint --no-warnings . -c .yamllint.yml diff --git a/Dockerfile b/docker/Dockerfile similarity index 100% rename from Dockerfile rename to docker/Dockerfile