|
1 | 1 | name: eve-kernel build |
| 2 | + |
2 | 3 | on: |
| 4 | + workflow_dispatch: |
3 | 5 | pull_request_review: |
4 | | - types: [submitted] |
5 | | - pull_request: |
6 | | - types: [opened, synchronize, closed] |
| 6 | + types: [ submitted ] |
7 | 7 | push: |
8 | 8 | branches: |
9 | 9 | - "eve-kernel-amd64-v6.1.38-generic" |
10 | | - workflow_dispatch: |
| 10 | + |
11 | 11 | concurrency: |
12 | 12 | group: ${{ github.workflow }}-${{ github.ref }} |
13 | 13 | cancel-in-progress: true |
| 14 | + |
14 | 15 | jobs: |
15 | 16 | packages: |
16 | 17 | runs-on: self-hosted |
| 18 | + if: ${{ github.event.review.state == 'approved' || github.ref == 'refs/heads/eve-kernel-amd64-v6.1.38-generic' }} |
17 | 19 | steps: |
18 | 20 | - name: Get eve-kernel |
19 | 21 | uses: actions/checkout@v3 |
20 | 22 | with: |
21 | 23 | ref: "eve-kernel-amd64-v6.1.38-generic" |
22 | | - - name: Always build eve-kernel-amd64 |
| 24 | + |
| 25 | + - name: Build eve-kernel-amd64 |
23 | 26 | run: | |
24 | 27 | make -f Makefile.eve BRANCH?=${GITHUB_REF##*/} kernel-gcc |
| 28 | +
|
25 | 29 | - name: Log in to Docker Hub |
26 | | - if: ( github.event_name == 'pull_request' && github.event.pull_request.merged == true ) || github.event_name == 'push' # Only if PR is merged or it was direct push |
27 | 30 | uses: docker/login-action@v3 |
28 | 31 | with: |
29 | 32 | username: ${{ secrets.RELEASE_DOCKERHUB_ACCOUNT }} |
30 | 33 | password: ${{ secrets.RELEASE_DOCKERHUB_TOKEN }} |
31 | | - - name: Login to DockerHUB |
32 | | - if: ( github.event_name == 'pull_request' && github.event.pull_request.merged == true ) || github.event_name == 'push' # Only if PR is merged or it was direct push |
33 | | - run: | |
34 | | - echo "${{ secrets.RELEASE_DOCKERHUB_TOKEN }}" |\ |
35 | | - docker login -u "${{ secrets.RELEASE_DOCKERHUB_ACCOUNT }}" --password-stdin |
| 34 | + |
36 | 35 | - name: Push eve-kernel-amd64-v6.1.38-generic if PR approved or pushed |
37 | | - if: ( github.event_name == 'pull_request' && github.event.pull_request.merged == true ) || github.event_name == 'push' # Only if PR is merged or it was direct push |
| 36 | + if: github.ref == 'refs/heads/eve-kernel-amd64-v6.1.38-generic' |
38 | 37 | run: | |
39 | | - make -f Makefile.eve BRANCH?=${GITHUB_REF##*/} push-gcc |
| 38 | + make -f Makefile.eve BRANCH?=${GITHUB_REF##*/} push-gcc |
0 commit comments