summary refs log tree commit diff
path: root/.github
diff options
context:
space:
mode:
authorJörg Thalheim <joerg@thalheim.io>2020-07-31 17:34:37 +0100
committerJörg Thalheim <joerg@thalheim.io>2020-07-31 17:34:37 +0100
commit4681807395f85827ecf6961a9e99bd1f02de622f (patch)
tree276155eb823479783feeb529fc342049aa9bdfb1 /.github
parent30afd2c29d94ecfda7a2e4ce3ab7c54771a7da54 (diff)
downloadnixpkgs-4681807395f85827ecf6961a9e99bd1f02de622f.tar
nixpkgs-4681807395f85827ecf6961a9e99bd1f02de622f.tar.gz
nixpkgs-4681807395f85827ecf6961a9e99bd1f02de622f.tar.bz2
nixpkgs-4681807395f85827ecf6961a9e99bd1f02de622f.tar.lz
nixpkgs-4681807395f85827ecf6961a9e99bd1f02de622f.tar.xz
nixpkgs-4681807395f85827ecf6961a9e99bd1f02de622f.tar.zst
nixpkgs-4681807395f85827ecf6961a9e99bd1f02de622f.zip
Revert "temporary delete github actions"
This reverts commit 256dbf698028f7c0fe2f7907cd3c4fcc3401af22.

This did not solve the github action failures
Diffstat (limited to '.github')
-rw-r--r--.github/workflows/editorconfig.yml22
-rw-r--r--.github/workflows/wait-ofborg.yml31
2 files changed, 53 insertions, 0 deletions
diff --git a/.github/workflows/editorconfig.yml b/.github/workflows/editorconfig.yml
new file mode 100644
index 00000000000..70959b42aa1
--- /dev/null
+++ b/.github/workflows/editorconfig.yml
@@ -0,0 +1,22 @@
+name: actions
+
+on:
+  pull_request:
+    branches:
+      - master
+
+jobs:
+  editorconfig:
+    runs-on: ubuntu-latest
+    steps:
+    - uses: actions/checkout@v2
+    - uses: technote-space/get-diff-action@v2.0.2
+    - name: editorconfig check
+      env:
+        VERSION: "2.0.4"
+        OS: "linux"
+        ARCH: "amd64"
+      run: |
+        curl -sSf -O -L -C - https://github.com/editorconfig-checker/editorconfig-checker/releases/download/$VERSION/ec-$OS-$ARCH.tar.gz && \
+        tar xzf ec-$OS-$ARCH.tar.gz && \
+        ./bin/ec-$OS-$ARCH -disable-indentation ${{ env.GIT_DIFF }}
diff --git a/.github/workflows/wait-ofborg.yml b/.github/workflows/wait-ofborg.yml
new file mode 100644
index 00000000000..35c58b2e912
--- /dev/null
+++ b/.github/workflows/wait-ofborg.yml
@@ -0,0 +1,31 @@
+name: "Wait for ofborg"
+on:
+  pull_request:
+jobs:
+  tests:
+    runs-on: ubuntu-latest
+    steps:
+    - name: Wait for ofborg CI
+      run: |
+        # wait for ~30min...
+        # ..in future a better fix would be to make ofborg mark CI as pending right away.
+        for i in $(seq 360); do
+          res=$(curl --silent \
+            -H "Accept: application/vnd.github.antiope-preview+json" \
+            -H "Authorization: token ${GITHUB_TOKEN}" \
+            "https://api.github.com/repos/NixOS/nixpkgs/commits/${COMMIT}/check-runs" | \
+            jq ".check_runs | map(.app) | map(.id) | contains([${OFBORG_APP_ID}])")
+          if [[ "$res" == "true" ]]; then
+            exit 0
+          fi
+          sleep 5
+          echo "."
+        done
+        echo "Timeout!"
+        exit 1
+      # ofborg is not checking forks.
+      if: github.repository_owner == 'NixOS'
+      env:
+        GITHUB_TOKEN: ${{ github.token }}
+        COMMIT: ${{ github.event.pull_request.head.sha }}
+        OFBORG_APP_ID: 20500