Skip to content

Commit

Permalink
chore: add backport bot and update release
Browse files Browse the repository at this point in the history
  • Loading branch information
f-necas committed Sep 10, 2024
1 parent 70d6cd7 commit 5dc115e
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 4 deletions.
29 changes: 29 additions & 0 deletions .github/workflows/backport.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Automatic backport action

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

permissions:
contents: write # so it can comment
pull-requests: write # so it can create pull requests

jobs:
backport:
name: Backport PR
if: github.event.pull_request.merged == true && !(contains(github.event.pull_request.labels.*.name, 'backport'))
runs-on: ubuntu-latest
steps:
- name: Backport Action
uses: sqren/backport-github-action@v9.3.0
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
10 changes: 7 additions & 3 deletions .github/workflows/maven.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,16 @@ jobs:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}

- name: push the docker image
if: github.repository == 'georchestra/data-api' && github.actor != 'dependabot[bot]' && (github.ref == 'refs/heads/main' || startsWith(github.event.ref, 'refs/tags/v'))
- name: push the lastest docker image
if: github.repository == 'georchestra/data-api' && github.actor != 'dependabot[bot]' && github.ref == 'refs/heads/main'
run: |
docker push georchestra/data-api:${{ steps.version.outputs.VERSION }}
docker push georchestra/data-api:latest
- name: push the release branch or tag docker image
if: github.repository == 'georchestra/data-api' && github.actor != 'dependabot[bot]' && (contains(github.ref, 'refs/heads/1.') || startsWith(github.event.ref, 'refs/tags/v'))
run: |
docker push georchestra/data-api:${{ steps.version.outputs.VERSION }}
- name: "Update Docker Hub Description"
if: github.ref == 'refs/heads/main' && github.repository == 'georchestra/data-api' && github.actor != 'dependabot[bot]' && github.event_name != 'pull_request'
uses: peter-evans/dockerhub-description@v3
Expand Down
2 changes: 1 addition & 1 deletion DOCKER_HUB.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

# Featured tags

- `latest`, `1.2.1`
- `latest`, `1.2.2`

# Quick reference

Expand Down

0 comments on commit 5dc115e

Please sign in to comment.