From d81f32a3fc69fa3321bb55c7451cc9cabe9eb4d2 Mon Sep 17 00:00:00 2001 From: Dmitriy <128726599+Magorsky@users.noreply.github.com> Date: Sun, 2 Jun 2024 17:17:31 +0300 Subject: [PATCH] add wf to build ci image with rust (#380) Co-authored-by: Magorsky --- .github/workflows/BuildRustImage.yml | 38 ++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 .github/workflows/BuildRustImage.yml diff --git a/.github/workflows/BuildRustImage.yml b/.github/workflows/BuildRustImage.yml new file mode 100644 index 000000000..d214a33e9 --- /dev/null +++ b/.github/workflows/BuildRustImage.yml @@ -0,0 +1,38 @@ +name: Build Rust Stable Image + +on: + workflow_dispatch: + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +env: + IMAGE_PREFIX: ci-rust + DEFAULT_TOOLCHAIN: 1.78.0 + REGISTRY: ghcr.io/${{ github.repository }} + +jobs: + build-and-push-image: + runs-on: ubuntu-latest + permissions: + contents: read + packages: write + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Log in to the github container registry + uses: docker/login-action@v3 + with: + registry: ${{ env.REGISTRY }} + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Build and push image + uses: docker/build-push-action@v5 + with: + context: docker + file: rust_ci.Dockerfile + push: true + tags: ${{ env.REGISTRY }}/${{ env.IMAGE_PREFIX }}:${{ env.DEFAULT_TOOLCHAIN }}