Skip to content

Commit

Permalink
✨ feat: Run CI job for
Browse files Browse the repository at this point in the history
  • Loading branch information
wanjohiryan committed Dec 8, 2024
1 parent 46c1a6f commit ebe2c10
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 3 deletions.
46 changes: 46 additions & 0 deletions .github/workflows/relay.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
#Tabs not spaces, you moron :)

name: Build nestri:relay
on:
pull_request:
paths:
- "containers/relay.Containerfile"
- ".github/workflows/relay.yml"
schedule:
- cron: 0 0 * * * # At the end of everyday
push:
branches: [main]
paths:
- "containers/relay.Containerfile"
- ".github/workflows/relay.yml"
tags:
- v*.*.*
release:
types: [created]

env:
REGISTRY: ghcr.io
IMAGE_NAME: nestrilabs/nestri
BASE_TAG_PREFIX: relay

jobs:
build-docker-pr:
name: Build image on PR
runs-on: ubuntu-latest
if: ${{ github.event_name == 'pull_request' }}
steps:
-
name: Checkout repo
uses: actions/checkout@v4
-
name: Setup Docker Buildx
uses: docker/setup-buildx-action@v3
-
name: Build Docker image
uses: docker/build-push-action@v5
with:
file: containers/relay.Containerfile
context: ./
push: false
load: true
tags: nestri:relay
6 changes: 3 additions & 3 deletions containers/runner.Containerfile
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ RUN mkdir plugin && \


#******************************************************************************
# runtime
# runtime
#******************************************************************************
FROM ${BASE_IMAGE} AS runtime

Expand All @@ -69,14 +69,14 @@ RUN pacman -Syu --noconfirm --needed \
ENV USER="nestri" \
UID=99 \
GID=100 \
USER_PASSWORD="nestri1234"
USER_PWD="nestri1234"

RUN mkdir -p /home/${USER} && \
groupadd -g ${GID} ${USER} && \
useradd -d /home/${USER} -u ${UID} -g ${GID} -s /bin/bash ${USER} && \
chown -R ${USER}:${USER} /home/${USER} && \
echo "${USER} ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers && \
echo "${USER}:${USER_PASSWORD}" | chpasswd
echo "${USER}:${USER_PWD}" | chpasswd

# Run directory #
RUN mkdir -p /run/user/${UID} && \
Expand Down

0 comments on commit ebe2c10

Please sign in to comment.