Skip to content

Commit

Permalink
modified the condition to push only if branch build
Browse files Browse the repository at this point in the history
Signed-off-by: Yash Bagarka <[email protected]>
  • Loading branch information
yash-zededa committed Oct 18, 2023
1 parent 727107d commit 7fdfa16
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
11 changes: 6 additions & 5 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,23 +15,24 @@ concurrency:
jobs:
packages:
runs-on: self-hosted
if: ${{ github.event.review.state == 'approved' || github.ref == 'refs/heads/eve-kernel-amd64-v6.1.38-generic' || startsWith(github.ref, 'refs/tags') }}
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
uses: docker/login-action@v3
with:
username: ${{ secrets.RELEASE_DOCKERHUB_ACCOUNT }}
password: ${{ secrets.RELEASE_DOCKERHUB_TOKEN }}

- name: Push eve-kernel-amd64-v6.1.38-generic if PR approved or pushed
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
2 changes: 1 addition & 1 deletion Makefile.eve
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,6 @@ kernel-%: Dockerfile.%
docker-tag-%:
@echo "docker.io/lfedge/eve-kernel:$(BRANCH)-$(VERSION)$(DIRTY)-$*"

push-%: kernel-%
push-%:
$(if $(DIRTY), $(error "Not pushing since the repo is dirty"))
docker push lfedge/eve-kernel:$(BRANCH)-$(VERSION)-$*

0 comments on commit 7fdfa16

Please sign in to comment.