Skip to content

Commit

Permalink
Merge pull request #966 from tsg-ut/asdf
Browse files Browse the repository at this point in the history
Setup asdf configurations
  • Loading branch information
hakatashi authored Nov 26, 2024
2 parents b8bc787 + fc46379 commit 4df80f9
Show file tree
Hide file tree
Showing 8 changed files with 1,471 additions and 1,594 deletions.
20 changes: 16 additions & 4 deletions .devcontainer/slackbot/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,11 +1,22 @@
FROM node:20-bookworm
FROM debian:bookworm-slim
ARG BRANCH_NAME=master

RUN apt-get update -y && \
# Install build dependencies for node-canvas
# https://github.com/Automattic/node-canvas/wiki/Installation%3A-Ubuntu-and-other-Debian-based-systems
apt-get install build-essential libcairo2-dev libpango1.0-dev libjpeg-dev libgif-dev librsvg2-dev -y && \
# Install other dependencies
apt-get install git bash gnupg -y && \
apt-get install git curl bash gnupg -y && \
# Setup asdf
git clone https://github.com/asdf-vm/asdf.git ~/.asdf --branch v0.14.1 && \
echo ". $HOME/.asdf/asdf.sh" >> ~/.bashrc && \
echo ". $HOME/.asdf/completions/asdf.bash" >> ~/.bashrc && \
echo "export ASDF_DIR=\"$HOME/.asdf\"" >> ~/.profile && \
echo ". \"$HOME/.asdf/asdf.sh\"" >> ~/.profile && \
. ~/.profile && \
# Install asdf plugins
asdf plugin add nodejs && \
asdf plugin add rust && \
# Install ngrok
curl -sSL https://ngrok-agent.s3.amazonaws.com/ngrok.asc | tee /etc/apt/trusted.gpg.d/ngrok.asc > /dev/null && \
echo "deb https://ngrok-agent.s3.amazonaws.com buster main" | tee /etc/apt/sources.list.d/ngrok.list && \
Expand All @@ -15,11 +26,12 @@ RUN apt-get update -y && \
# https://source.chromium.org/chromium/chromium/src/+/main:chrome/installer/linux/debian/dist_package_versions.json;l=39-75;drc=df14ef63b2bc818472205e50ad32a3511db4edb2
curl -sSL https://dl-ssl.google.com/linux/linux_signing_key.pub | gpg --dearmor -o /usr/share/keyrings/googlechrome-linux-keyring.gpg && \
echo "deb [arch=amd64 signed-by=/usr/share/keyrings/googlechrome-linux-keyring.gpg] http://dl.google.com/linux/chrome/deb/ stable main" | tee /etc/apt/sources.list.d/google.list && \
apt-get update && \
apt-get update -y && \
apt-get install google-chrome-stable fonts-ipafont-gothic libasound2 libatk-bridge2.0-0 libatk1.0-0 libatspi2.0-0 libc6 libcairo2 libcups2 libdbus-1-3 libdrm2 libexpat1 libgbm1 libglib2.0-0 libnspr4 libnss3 libpango-1.0-0 libpangocairo-1.0-0 libstdc++6 libudev1 libuuid1 libx11-6 libx11-xcb1 libxcb-dri3-0 libxcb1 libxcomposite1 libxcursor1 libxdamage1 libxext6 libxfixes3 libxi6 libxkbcommon0 libxrandr2 libxrender1 libxshmfence1 libxss1 libxtst6 -y && \
# Install slackbot npm dependencies
git clone https://github.com/tsg-ut/slackbot.git --branch master --single-branch --recursive --depth 1 /code && \
git clone https://github.com/tsg-ut/slackbot.git --branch ${BRANCH_NAME} --single-branch --recursive --depth 1 /code && \
cd /code && \
asdf install && \
npm install && \
# Cleanup
apt-get clean && \
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/codespaces-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,9 @@ jobs:
with:
context: .devcontainer/slackbot
push: true
tags: ghcr.io/tsg-ut/slackbot-codespaces-image-slackbot:master
tags: ghcr.io/tsg-ut/slackbot-codespaces-image-slackbot:${{ env.BRANCH_NAME }}
build-args: |
BRANCH_NAME=${{ env.BRANCH_NAME }}
- name: Generate artifact attestation (slackbot)
uses: actions/attest-build-provenance@v1
Expand Down
6 changes: 2 additions & 4 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,8 @@ jobs:
- name: Checkout Repo
uses: actions/checkout@master

- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: 16
- name: Setup Tools
uses: asdf-vm/actions/install@v3

- name: Install Dependencies
run: npm install
Expand Down
13 changes: 4 additions & 9 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,8 @@ jobs:
steps:
- uses: actions/checkout@v3

- name: Install Node.js
uses: actions/setup-node@v3
with:
node-version: 16
- name: Setup Tools
uses: asdf-vm/actions/install@v3

- name: Before Install
run: |
Expand Down Expand Up @@ -57,11 +55,8 @@ jobs:
steps:
- uses: actions/checkout@v3

- uses: actions-rs/toolchain@v1
with:
toolchain: nightly-2022-07-23
default: true
override: true
- name: Setup Tools
uses: asdf-vm/actions/install@v3

- name: build
run: cargo build --all --verbose
Expand Down
1 change: 0 additions & 1 deletion .node-version

This file was deleted.

2 changes: 2 additions & 0 deletions .tool-versions
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
nodejs 20.18.1
rust nightly-2022-07-23
Loading

0 comments on commit 4df80f9

Please sign in to comment.