Merge 'actions' branch - update docker container and move to Gitea Actions
OSCW Runner Container Build / OSCW-Runner-Container (push) Successful in 6m57s Details

This commit is contained in:
Rafal Kupiec 2023-09-14 22:15:27 +02:00
parent e9acb88e5b
commit 1f26ef9daf
Signed by: belliash
GPG Key ID: 4E829243E0CFE6B4
3 changed files with 31 additions and 1 deletions

21
.github/workflows/build.yml vendored Normal file
View File

@ -0,0 +1,21 @@
name: OSCW Runner Container Build
run-name: ${{ github.actor }} running Gitea Actions
on: [push]
jobs:
OSCW-Runner-Container:
runs-on: oscw
container:
image: codingworkshop/oscw-runner:latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Build container
env:
OSCW_DOCKERHUB_USERNAME: ${{ secrets.OSCW_DOCKERHUB_USERNAME }}
OSCW_DOCKERHUB_PASSWORD: ${{ secrets.OSCW_DOCKERHUB_PASSWORD }}
run: |
echo "$OSCW_DOCKERHUB_PASSWORD" | docker login -u $OSCW_DOCKERHUB_USERNAME --password-stdin
docker build -t codingworkshop/oscw-runner:latest .
docker push codingworkshop/oscw-runner:latest
docker image prune -af

View File

@ -12,6 +12,11 @@ RUN echo 'en_US.UTF-8 UTF-8' > /etc/locale.gen && \
echo 'LANG=en_US.UTF-8' > /etc/locale.conf && \
locale-gen
# Configure system
RUN git config --global http.sslVerify "false" && \
git config --global user.email "no-reply@codingworkshop.eu.org" && \
git config --global user.name "OSCW Runner"
# Install Docker-in-Docker
ENV DIND_COMMIT 3b5fac462d21ca164b3778647420016315289034
RUN wget "https://raw.githubusercontent.com/docker/docker/${DIND_COMMIT}/hack/dind" -O /usr/local/bin/dind && \
@ -24,7 +29,7 @@ VOLUME /var/lib/docker
EXPOSE 2375
# Install XT toolchain
RUN wget https://github.com/xt-sys/xtchain/releases/download/2.7/xtchain-2.7-linux.tar.zst -O xtchain.tar.zst && \
RUN wget https://github.com/xt-sys/xtchain/releases/download/2.8.3/xtchain-2.8.3-linux.tar.zst -O xtchain.tar.zst && \
mkdir -p /opt/xtchain && \
tar xapf xtchain.tar.zst -C /opt/xtchain && \
rm xtchain.tar.zst

View File

@ -3,6 +3,10 @@
SOURCE="${1}"
DESTINATION="${2}"
if [ ${GITHUB_ACTIONS} ] ; then
[ -z ${CI_COMMIT_REF} ] && CI_COMMIT_REF="${GITHUB_REF}"
fi
echo "Publishing CI/CD artifacts for '${CI_COMMIT_REF}'"
echo "$OSCW_ARTIFACTS_USERKEY" | base64 -d > ~/artifacts.key