Skip to content

Commit

Permalink
build: add taskrunner image for testing this resource
Browse files Browse the repository at this point in the history
  • Loading branch information
favna committed Aug 10, 2024
1 parent 1847f60 commit 90aeed3
Show file tree
Hide file tree
Showing 3 changed files with 60 additions and 1 deletion.
29 changes: 28 additions & 1 deletion .github/workflows/continuous-delivery.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ on:

jobs:
Publish:
name: Publish image to container registries
name: Publish image to container registry
runs-on: ubuntu-latest
steps:
- name: Checkout Project
Expand All @@ -37,3 +37,30 @@ jobs:
linux/amd64
linux/arm64
tags: ghcr.io/favware/concource-discord-webhook-resource:alpha

PublishTaskRunner:
name: Publish Task Runner image to container registry
runs-on: ubuntu-latest
steps:
- name: Checkout Project
uses: actions/checkout@v4
- name: Setup Docker Buildx
uses: docker/[email protected]
- name: Login to GitHub Container Registry
uses: docker/[email protected]
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push Docker image
uses: docker/[email protected]
with:
push: true
context: .
file: Dockerfile.taskrunner
cache-from: type=gha
cache-to: type=gha,mode=max
platforms: |
linux/amd64
linux/arm64
tags: ghcr.io/favware/concource-taskrunner:alpha
22 changes: 22 additions & 0 deletions Dockerfile.taskrunner
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
FROM node:20-alpine3.20

ENV CI true

ENV FLY_VERSION 7.11.2
ENV YARN_VERSION=4.4.0
ENV TRANSCRYPT_URL "https://raw.githubusercontent.com/elasticdog/transcrypt/v2.2.3/transcrypt"
ENV FLY_URL "https://github.com/concourse/concourse/releases/download/v${FLY_VERSION}/fly-${FLY_VERSION}-linux-amd64.tgz"
ENV LANG en_US.UTF-8 LANGUAGE=en_US:en LC_ALL=en_US.UTF-8

RUN echo fs.inotify.max_user_watches=524288 | tee -a /etc/sysctl.conf && sysctl -p && \
# Install dependencies
apk --update --no-cache add openssh bash bzip2 coreutils curl jq git-lfs gzip openssl tar wget zip util-linux python3 python3-dev musl-dev py-pip moreutils make sed gcc yq-go && \
# Download Transcrypt
wget -q ${TRANSCRYPT_URL} -O /usr/local/bin/transcrypt && \
# Download Fly
wget -q ${FLY_URL} -O fly.tgz && tar -C /usr/local/bin -xzf fly.tgz && rm fly.tgz && \
chmod +x /usr/local/bin/transcrypt /usr/local/bin/fly && \
corepack enable && corepack install --global yarn@${YARN_VERSION} && \
rm -rf /var/lib/apt/lists/*

CMD ["/bin/bash"]
10 changes: 10 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,13 @@ services:
tty: true
stdin_open: true
command: /bin/bash

taskrunner:
image: ghcr.io/favware/concource-taskrunner:dev
build:
context: .
dockerfile: Dockerfile.taskrunner
container_name: taskrunner
tty: true
stdin_open: true
command: /bin/bash

0 comments on commit 90aeed3

Please sign in to comment.