CI: restore full build, restrict to 'our' repo

- this should prevent forks from duplicate-reporting builds
This commit is contained in:
Adriaan de Groot 2021-02-01 14:41:07 +01:00
parent 9af44a3c8d
commit 1da84ca09b
2 changed files with 11 additions and 25 deletions

View File

@ -26,6 +26,7 @@ jobs:
container: container:
image: docker://kdeneon/plasma:user image: docker://kdeneon/plasma:user
options: --tmpfs /build:rw --user 0:0 options: --tmpfs /build:rw --user 0:0
if: github.repository == "calamares/calamares"
steps: steps:
- name: "prepare env" - name: "prepare env"
run: | run: |
@ -71,18 +72,12 @@ jobs:
- name: "Calamares: cmake" - name: "Calamares: cmake"
working-directory: ${{ env.BUILDDIR }} working-directory: ${{ env.BUILDDIR }}
run: cmake $CMAKE_ARGS $SRCDIR run: cmake $CMAKE_ARGS $SRCDIR
- name: "dump context" - name: "Calamares: make"
env: working-directory: ${{ env.BUILDDIR }}
JOBS_CONTEXT: ${{ toJSON(job) }} run: make -j2 VERBOSE=1
STEPS_CONTEXT: ${{ toJSON(steps) }} - name: "Calamares: install"
EVENT_CONTEXT: ${{ toJSON(github.event) }} working-directory: ${{ env.BUILDDIR }}
run: | run: make install VERBOSE=1
echo "STEPS"
echo "$STEPS_CONTEXT"
echo "JOB"
echo "$JOBS_CONTEXT"
echo "EVENT"
echo "$EVENT_CONTEXT"
- name: "notify: ok" - name: "notify: ok"
uses: rectalogic/notify-irc@v1 uses: rectalogic/notify-irc@v1
if: ${{ success() }} if: ${{ success() }}
@ -90,7 +85,7 @@ jobs:
server: chat.freenode.net server: chat.freenode.net
channel: "#calamares" channel: "#calamares"
nickname: gh-notify nickname: gh-notify
message: "CI OK for '${{ github.event.head_commit.message }}'" message: "CI OK for '${{ github.event.head_commit.message }}' in ${{ github.repository }}"
- name: "notify: fail" - name: "notify: fail"
uses: rectalogic/notify-irc@v1 uses: rectalogic/notify-irc@v1
if: ${{ failure() }} if: ${{ failure() }}
@ -101,13 +96,3 @@ jobs:
message: | message: |
CI FAIL for '${{ github.event.head_commit.message }}' CI FAIL for '${{ github.event.head_commit.message }}'
.. DIFF ${{ github.event.compare }} .. DIFF ${{ github.event.compare }}
# Unused while we figure out notifications.
# - name: "Calamares: make"
# working-directory: ${{ env.BUILDDIR }}
# run: make -j2 VERBOSE=1
# - name: "Calamares: install"
# working-directory: ${{ env.BUILDDIR }}
# run: |
# make install VERBOSE=1
#

View File

@ -7,6 +7,7 @@ on:
jobs: jobs:
irc: irc:
runs-on: ubuntu-latest runs-on: ubuntu-latest
if: github.repository == "calamares/calamares"
steps: steps:
- name: "notify: new" - name: "notify: new"
uses: rectalogic/notify-irc@v1 uses: rectalogic/notify-irc@v1
@ -15,7 +16,7 @@ jobs:
server: chat.freenode.net server: chat.freenode.net
channel: "#calamares" channel: "#calamares"
nickname: gh-issues nickname: gh-issues
message: "[${{ github.event.issue.title }}](${{ github.event.issue.url }}) opened by ${{ github.actor }}" message: "[${{ github.event.issue.title }}](${{ github.event.issue.html_url }}) opened by ${{ github.actor }}"
- name: "notify: closed" - name: "notify: closed"
uses: rectalogic/notify-irc@v1 uses: rectalogic/notify-irc@v1
if: github.event.issue.state != "open" if: github.event.issue.state != "open"
@ -23,4 +24,4 @@ jobs:
server: chat.freenode.net server: chat.freenode.net
channel: "#calamares" channel: "#calamares"
nickname: gh-issues nickname: gh-issues
message: "[${{ github.event.issue.title }}](${{ github.event.issue.url }}) closed by ${{ github.actor }}" message: "[${{ github.event.issue.title }}](${{ github.event.issue.html_url }}) closed by ${{ github.actor }}"