From ded3ed53c6c365afc643ef42f17c5ef7ddc16cbf Mon Sep 17 00:00:00 2001 From: Sergey Ladanov Date: Fri, 22 Sep 2023 17:35:21 +0300 Subject: [PATCH 1/3] add --- Dockerfile | 32 +++++++++++++++++++++++++++----- README.md | 8 +++++++- action.yml | 7 +++---- docker-compose.yml | 10 ++++++++++ entrypoint.sh | 5 +++++ 5 files changed, 52 insertions(+), 10 deletions(-) create mode 100644 docker-compose.yml create mode 100644 entrypoint.sh diff --git a/Dockerfile b/Dockerfile index 58dbee9..7e5c147 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,14 +1,36 @@ FROM debian:stable-slim -RUN apt-get update && \ +ARG VERSION=12.3.1-1.1 + +RUN ARCH="$(dpkg --print-architecture)" && \ + case $ARCH in \ + "amd64") \ + ARCH_TAG="x64" \ + ;; \ + "arm64") \ + ARCH_TAG="arm64" \ + ;; \ + esac && \ + # Get nessecary packages + apt-get update && \ apt-get install \ --no-install-recommends \ - gcc-arm-none-eabi \ - libstdc++-arm-none-eabi-newlib \ make \ cmake \ + wget \ + ca-certificates \ -y && \ - rm -rf /var/cache/apt - + rm -rf /var/cache/apt && \ + mkdir /workdir && \ + cd /workdir && \ + wget https://github.com/xpack-dev-tools/arm-none-eabi-gcc-xpack/releases/download/v${VERSION}/xpack-arm-none-eabi-gcc-${VERSION}-linux-${ARCH_TAG}.tar.gz && \ + tar xvf xpack-arm-none-eabi-gcc-${VERSION}-linux-${ARCH_TAG}.tar.gz && \ + rm xpack-arm-none-eabi-gcc-${VERSION}-linux-${ARCH_TAG}.tar.gz +RUN echo 'export PATH="/workdir/xpack-arm-none-eabi-gcc-'${VERSION}'/bin:$PATH"' >> /etc/bashrc +ADD entrypoint.sh /entrypoint.sh + +RUN chmod +x /entrypoint.sh + +ENTRYPOINT [ "/entrypoint.sh" ] diff --git a/README.md b/README.md index 72e59dc..25a27ef 100644 --- a/README.md +++ b/README.md @@ -14,8 +14,14 @@ jobs: - uses: actions/checkout@v3 - name: make - uses: embedd-actions/arm-gcc-ci@v1 + uses: embedd-actions/arm-gcc-ci@v12.3.1 with: command: make --directory Release all ``` + +## List of available tags + +``` +v12.3.1 +``` diff --git a/action.yml b/action.yml index 4f4b978..68a2333 100644 --- a/action.yml +++ b/action.yml @@ -7,9 +7,8 @@ inputs: default: arm-none-eabi-gcc --version runs: using: 'docker' - image: 'docker://sergeyladanov/arm-gcc:v1' + image: 'Dockerfile' + #image: 'docker://sergeyladanov/arm-gcc:v12.3.1' args: - - /bin/sh - - -c - - ${{ inputs.command }} + - ${{ inputs.command }} diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..00965df --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,10 @@ +version: '2' + +services: + arm-gcc: + container_name: arm-gcc + build: + context: . + dockerfile: Dockerfile + args: + - VERSION=12.3.1-1.1 \ No newline at end of file diff --git a/entrypoint.sh b/entrypoint.sh new file mode 100644 index 0000000..9d48d31 --- /dev/null +++ b/entrypoint.sh @@ -0,0 +1,5 @@ +#!/bin/bash + + . /etc/bashrc + +exec $@ From 4693661e09cdc5574daff976fa029cf1e3bc4b9c Mon Sep 17 00:00:00 2001 From: Sergey <61871201+SergeyLadanov@users.noreply.github.com> Date: Fri, 22 Sep 2023 17:36:24 +0300 Subject: [PATCH 2/3] Update action.yml --- action.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/action.yml b/action.yml index 68a2333..01952ee 100644 --- a/action.yml +++ b/action.yml @@ -7,8 +7,7 @@ inputs: default: arm-none-eabi-gcc --version runs: using: 'docker' - image: 'Dockerfile' - #image: 'docker://sergeyladanov/arm-gcc:v12.3.1' + image: 'docker://sergeyladanov/arm-gcc:v12.3.1' args: - ${{ inputs.command }} From 7ed3d0c0bac0018c14c73084afd33c46d381444d Mon Sep 17 00:00:00 2001 From: Sergey <61871201+SergeyLadanov@users.noreply.github.com> Date: Fri, 22 Sep 2023 18:06:51 +0300 Subject: [PATCH 3/3] Update action.yml --- action.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/action.yml b/action.yml index 01952ee..107641b 100644 --- a/action.yml +++ b/action.yml @@ -1,5 +1,8 @@ name: 'ARM GCC build' -description: 'Building arm projects' +description: 'Building arm-gcc projects' +branding: + color: blue + icon: microchip inputs: command: description: 'Command'