forked from lf-edge/eve-kernel
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
modified the conditonal trigger, removed an extra docker login command
Signed-off-by: Yash Bagarka <[email protected]>
- Loading branch information
1 parent
0c3194d
commit de200c3
Showing
2 changed files
with
13 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,39 +1,38 @@ | ||
name: eve-kernel build | ||
|
||
on: | ||
workflow_dispatch: | ||
pull_request_review: | ||
types: [submitted] | ||
pull_request: | ||
types: [opened, synchronize, closed] | ||
types: [ submitted ] | ||
push: | ||
branches: | ||
- "eve-kernel-amd64-v6.1.38-generic" | ||
workflow_dispatch: | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
packages: | ||
runs-on: self-hosted | ||
if: ${{ github.event.review.state == 'approved' || github.ref == 'refs/heads/eve-kernel-amd64-v6.1.38-generic' }} | ||
steps: | ||
- name: Get eve-kernel | ||
uses: actions/checkout@v3 | ||
with: | ||
ref: "eve-kernel-amd64-v6.1.38-generic" | ||
- name: Always build eve-kernel-amd64 | ||
|
||
- name: Build eve-kernel-amd64 | ||
run: | | ||
make -f Makefile.eve BRANCH?=${GITHUB_REF##*/} kernel-gcc | ||
- name: Log in to Docker Hub | ||
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 | ||
uses: docker/login-action@v3 | ||
with: | ||
username: ${{ secrets.RELEASE_DOCKERHUB_ACCOUNT }} | ||
password: ${{ secrets.RELEASE_DOCKERHUB_TOKEN }} | ||
- name: Login to DockerHUB | ||
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 | ||
run: | | ||
echo "${{ secrets.RELEASE_DOCKERHUB_TOKEN }}" |\ | ||
docker login -u "${{ secrets.RELEASE_DOCKERHUB_ACCOUNT }}" --password-stdin | ||
|
||
- name: Push eve-kernel-amd64-v6.1.38-generic if PR approved or pushed | ||
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 | ||
if: github.ref == 'refs/heads/eve-kernel-amd64-v6.1.38-generic' | ||
run: | | ||
make -f Makefile.eve BRANCH?=${GITHUB_REF##*/} push-gcc | ||
make -f Makefile.eve BRANCH?=${GITHUB_REF##*/} push-gcc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters