Skip to content

Commit

Permalink
feat(workflow): add toolchain version to docker build workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
muXxer committed Nov 13, 2024
1 parent 5d0ec55 commit f6fe4ab
Showing 1 changed file with 44 additions and 0 deletions.
44 changes: 44 additions & 0 deletions .github/workflows/release_docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,15 @@ jobs:
- name: Checkout code
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # pin@v4

- name: Read Rust toolchain version from TOML
id: read_toolchain
run: |
TOOLCHAIN_VERSION=$(grep -oE 'channel = "[^"]+' ./rust-toolchain.toml | sed 's/channel = "//')
echo "TOOLCHAIN_VERSION=${TOOLCHAIN_VERSION}" >> $GITHUB_ENV
- name: Log Rust toolchain version
run: echo "Rust toolchain version is ${{ env.TOOLCHAIN_VERSION }}"

- name: Set up QEMU
uses: docker/setup-qemu-action@49b3bc8e6bdd4a60e6116a5414239cba5943d3cf # pin@v3

Expand Down Expand Up @@ -81,6 +90,8 @@ jobs:
ssh: default
context: .
file: docker/iota-node/Dockerfile
build-args: |
RUST_IMAGE_VERSION=${{ env.TOOLCHAIN_VERSION }}-bookworm
platforms: linux/amd64
tags: ${{ steps.meta-node.outputs.tags }}
push: true
Expand All @@ -94,6 +105,15 @@ jobs:
- name: Checkout code
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # pin@v4

- name: Read Rust toolchain version from TOML
id: read_toolchain
run: |
TOOLCHAIN_VERSION=$(grep -oE 'channel = "[^"]+' ./rust-toolchain.toml | sed 's/channel = "//')
echo "TOOLCHAIN_VERSION=${TOOLCHAIN_VERSION}" >> $GITHUB_ENV
- name: Log Rust toolchain version
run: echo "Rust toolchain version is ${{ env.TOOLCHAIN_VERSION }}"

- name: Set up QEMU
uses: docker/setup-qemu-action@49b3bc8e6bdd4a60e6116a5414239cba5943d3cf # pin@v3

Expand Down Expand Up @@ -140,6 +160,8 @@ jobs:
ssh: default
context: .
file: docker/iota-indexer/Dockerfile
build-args: |
RUST_IMAGE_VERSION=${{ env.TOOLCHAIN_VERSION }}-bookworm
platforms: linux/amd64
tags: ${{ steps.meta-indexer.outputs.tags }}
push: true
Expand All @@ -153,6 +175,15 @@ jobs:
- name: Checkout code
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # pin@v4

- name: Read Rust toolchain version from TOML
id: read_toolchain
run: |
TOOLCHAIN_VERSION=$(grep -oE 'channel = "[^"]+' ./rust-toolchain.toml | sed 's/channel = "//')
echo "TOOLCHAIN_VERSION=${TOOLCHAIN_VERSION}" >> $GITHUB_ENV
- name: Log Rust toolchain version
run: echo "Rust toolchain version is ${{ env.TOOLCHAIN_VERSION }}"

- name: Set up QEMU
uses: docker/setup-qemu-action@49b3bc8e6bdd4a60e6116a5414239cba5943d3cf # pin@v3

Expand Down Expand Up @@ -199,6 +230,8 @@ jobs:
ssh: default
context: .
file: docker/iota-tools/Dockerfile
build-args: |
RUST_IMAGE_VERSION=${{ env.TOOLCHAIN_VERSION }}-bookworm
platforms: linux/amd64
tags: ${{ steps.meta-tools.outputs.tags }}
push: true
Expand All @@ -212,6 +245,15 @@ jobs:
- name: Checkout code
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # pin@v4

- name: Read Rust toolchain version from TOML
id: read_toolchain
run: |
TOOLCHAIN_VERSION=$(grep -oE 'channel = "[^"]+' ./rust-toolchain.toml | sed 's/channel = "//')
echo "TOOLCHAIN_VERSION=${TOOLCHAIN_VERSION}" >> $GITHUB_ENV
- name: Log Rust toolchain version
run: echo "Rust toolchain version is ${{ env.TOOLCHAIN_VERSION }}"

- name: Set up QEMU
uses: docker/setup-qemu-action@49b3bc8e6bdd4a60e6116a5414239cba5943d3cf # pin@v3

Expand Down Expand Up @@ -258,6 +300,8 @@ jobs:
ssh: default
context: .
file: docker/iota-graphql-rpc/Dockerfile
build-args: |
RUST_IMAGE_VERSION=${{ env.TOOLCHAIN_VERSION }}-bookworm
platforms: linux/amd64
tags: ${{ steps.meta-tools.outputs.tags }}
push: true
Expand Down

0 comments on commit f6fe4ab

Please sign in to comment.