From ca804e59df14cb8f21c0dc35daf51b79f36d11a0 Mon Sep 17 00:00:00 2001 From: Koki Takahashi Date: Tue, 26 Nov 2024 15:01:51 +0000 Subject: [PATCH] Try to build codespaces docker image in this branch --- .devcontainer/slackbot/Dockerfile | 3 ++- .github/workflows/codespaces-image.yml | 5 ++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.devcontainer/slackbot/Dockerfile b/.devcontainer/slackbot/Dockerfile index 6c5698c5..4436298e 100644 --- a/.devcontainer/slackbot/Dockerfile +++ b/.devcontainer/slackbot/Dockerfile @@ -1,4 +1,5 @@ FROM debian:bookworm-slim +ARG BRANCH_NAME=master RUN apt-get update -y && \ # Install build dependencies for node-canvas @@ -28,7 +29,7 @@ RUN apt-get update -y && \ 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 asdf --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 && \ diff --git a/.github/workflows/codespaces-image.yml b/.github/workflows/codespaces-image.yml index 95303b89..a6ee7d5c 100644 --- a/.github/workflows/codespaces-image.yml +++ b/.github/workflows/codespaces-image.yml @@ -4,6 +4,7 @@ on: push: branches: - master + - asdf env: BRANCH_NAME: ${{ github.head_ref || github.ref_name }} @@ -35,7 +36,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