diff --git a/.gitea/workflows/workflow1.yaml b/.gitea/workflows/workflow1.yaml index 164f61a..4f174f7 100644 --- a/.gitea/workflows/workflow1.yaml +++ b/.gitea/workflows/workflow1.yaml @@ -3,12 +3,13 @@ run-name: ${{ gitea.actor }} is testing out Gitea Actions 🚀 on: [push] jobs: - Explore-Gitea-Actions: - container: alpine + build-containers: + container: docker-bootstrap steps: - - run: apk add nodejs - name: Check out repository code uses: actions/checkout@v4 - - name: Do stuff + + - name: offline-twitter/go2 run: | - cat /etc/alpine-release + cd build + docker build -f go.dockerfile -t offline-twitter/go2 . diff --git a/build/container-that-builds-containers.dockerfile b/build/container-that-builds-containers.dockerfile new file mode 100644 index 0000000..c36ba88 --- /dev/null +++ b/build/container-that-builds-containers.dockerfile @@ -0,0 +1,4 @@ +from docker + +# So that it can be used as the runner container for Actions (`actions/checkout`) +run apk add nodejs diff --git a/build/go.dockerfile b/build/go.dockerfile new file mode 100644 index 0000000..63b8d47 --- /dev/null +++ b/build/go.dockerfile @@ -0,0 +1,14 @@ +from ubuntu:jammy + +run apt update && apt install -y sudo curl wget build-essential sqlite3 jq git musl-dev musl-tools + +# Install go and golangci-lint +run wget https://go.dev/dl/go1.21.4.linux-amd64.tar.gz && tar -C /usr/local -xzf go1.21.4.linux-amd64.tar.gz +env PATH="$PATH:/usr/local/go/bin" +run curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b /usr/local/go/bin v1.59.1 + +# Install project dependencies (so they don't have to be reinstalled on every CI run) +run git clone https://gitlab.com/offline-twitter/twitter_offline_engine.git && cd twitter_offline_engine && go install ./... && cd .. && rm -r twitter_offline_engine + +# For SSH upload +copy known_hosts /root/.ssh/known_hosts diff --git a/build/known_hosts b/build/known_hosts new file mode 100644 index 0000000..ace317e --- /dev/null +++ b/build/known_hosts @@ -0,0 +1,5 @@ +# offline-twitter.com +|1|oLVG8OogkuOJRgCV4ich/pdRIm8=|OLp/ptsX1+UbNBdRUJn3eGOQ4SA= ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIAzQ7p29GgUpU8LIGznke+P0md+0jyaplRzyrQpOe7Wv + +# apt.playfulpachyderm.com +|1|MfJavziCqGCZtZscsk1AaYAnQNQ=|1PCSWwZEwrg0aCHGu8sPeG2OjmM= ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIAzQ7p29GgUpU8LIGznke+P0md+0jyaplRzyrQpOe7Wv