Skip to content

Commit

Permalink
chire(rust-base): build image with no cache 🧼
Browse files Browse the repository at this point in the history
  • Loading branch information
ahasna committed Mar 25, 2024
1 parent f3a0b2a commit 2dfd405
Showing 1 changed file with 12 additions and 13 deletions.
25 changes: 12 additions & 13 deletions .github/workflows/docker-build-rust-base.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,17 +23,17 @@ jobs:
matrix:
ubuntu_version: [20.04, 22.04]
steps:
- name: Checkout
- name: Checkout 🛒
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11

- name: Get toolchain version
- name: Get toolchain version 🛠🦀️
id: toolchain
run: |
RUST_TOOLCHAIN=$(grep 'channel' rust-toolchain.toml | sed -n -e 's/^.*channel = "\(.*\)".*$/\1/p')
echo "Found Rust Toolchain: $RUST_TOOLCHAIN"
echo "rust_toolchain=$RUST_TOOLCHAIN" >> $GITHUB_OUTPUT
- name: Set Image Tags
- name: Set Image Tags 🏷
id: image_tags
run: |
if [ "${{ github.event.inputs.debug_image }}" = "true" ]; then
Expand All @@ -42,16 +42,16 @@ jobs:
echo "image_tag=${{ steps.toolchain.outputs.rust_toolchain }}-ubuntu-${{ matrix.ubuntu_version }}" >> $GITHUB_OUTPUT
fi
- name: Debug | Check Docker Image Tag
- name: Debug | Check Docker Image Tag 🧐🐳
run: echo "Docker Image Tag output ${{ steps.image_tags.outputs.image_tag }}"

- name: Set up QEMU
uses: docker/setup-qemu-action@68827325e0b33c7199eb31dd4e31fbe9023e06e3
- name: Install and configure Namespace CLI 📟
uses: namespacelabs/nscloud-setup@v0

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@f95db51fddba0c2d1ec667646a06c2ce06100226
- name: Set up Namespace Buildx 👷
uses: namespacelabs/nscloud-setup-buildx-action@v0

- name: Docker meta
- name: Docker meta 🔖
id: meta
uses: docker/metadata-action@31cebacef4805868f9ce9a0cb03ee36c32df2ac4
with:
Expand All @@ -65,18 +65,17 @@ jobs:
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build and push
- name: Build and push 🏗️🫸
uses: docker/build-push-action@4a13e500e55cf31b7a5d59a38ab2040ab0f42f56
with:
context: .
push: true
tags: ${{ steps.meta.outputs.tags }}
cache-from: type=gha
cache-to: type=gha,mode=max
no-cache: true
file: ci/docker/development/rust-base.Dockerfile
build-args: |
UBUNTU_VERSION=${{ matrix.ubuntu_version }}
- name: Summary
- name: Summary 📋
run: |
echo "The following images were built and pushed: \`${{ steps.image_tags.outputs.image_tag }}\`" >> $GITHUB_STEP_SUMMARY

0 comments on commit 2dfd405

Please sign in to comment.