Merge 'actions' branch - update docker container and move to Gitea Actions
Some checks failed
OSCW Runner Container Build / OSCW-Runner-Container (push) Failing after 2m55s
Some checks failed
OSCW Runner Container Build / OSCW-Runner-Container (push) Failing after 2m55s
This commit is contained in:
parent
e9acb88e5b
commit
d8819fb715
21
.github/workflows/build.yml
vendored
Normal file
21
.github/workflows/build.yml
vendored
Normal 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
|
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user