Skip to content

Commit

Permalink
Merge pull request #276 from georchestra/backport-bot-and-ci
Browse files Browse the repository at this point in the history
Add backport bot and remove push image from yml file
  • Loading branch information
f-necas authored Jan 17, 2024
2 parents 9de6419 + 1d1f436 commit 8600c0f
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 17 deletions.
24 changes: 24 additions & 0 deletions .github/workflows/backport.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Automatic backport action

on:
pull_request_target:
types: ["labeled", "closed"]

jobs:
backport:
name: Backport PR
runs-on: ubuntu-latest
steps:
- name: Backport Action
uses: sqren/[email protected]
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
auto_backport_label_prefix: backport-to-

- name: Info log
if: ${{ success() }}
run: cat ~/.backport/backport.info.log

- name: Debug log
if: ${{ failure() }}
run: cat ~/.backport/backport.debug.log
18 changes: 1 addition & 17 deletions .github/workflows/georchestra-gn4.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ env:

jobs:
build:
if: "!startsWith(github.event.head_commit.message, '[skip ci] ')"
runs-on: ubuntu-latest
timeout-minutes: 40
steps:
Expand Down Expand Up @@ -68,20 +69,3 @@ jobs:
name: geonetwork.war
path: web/target/geonetwork.war

- name: "Login onto docker-hub"
if: github.repository == 'georchestra/geonetwork' && github.actor != 'dependabot[bot]' && github.ref == 'refs/heads/georchestra-gn4.2.x' && github.event_name != 'pull_request'
uses: docker/login-action@v1
with:
username: '${{ secrets.DOCKER_HUB_USERNAME }}'
password: '${{ secrets.DOCKER_HUB_PASSWORD }}'

- name: "Pushing branch image to docker-hub"
if: github.repository == 'georchestra/geonetwork' && github.actor != 'dependabot[bot]' && github.ref == 'refs/heads/georchestra-gn4.2.x' && github.event_name != 'pull_request'
run: |
docker push georchestra/geonetwork:${DOCKER_TAG}
- name: "Pushing latest image to docker-hub"
if: github.repository == 'georchestra/geonetwork' && github.actor != 'dependabot[bot]' && github.ref == 'refs/heads/georchestra-gn4.2.x' && github.event_name != 'pull_request'
run: |
docker tag georchestra/geonetwork:${DOCKER_TAG} georchestra/geonetwork:latest
docker push georchestra/geonetwork:latest

0 comments on commit 8600c0f

Please sign in to comment.