Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Allow auto-pr to include multiple changes #1365

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 14 additions & 7 deletions .github/workflows/official-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,24 @@ jobs:
path: official-images
repository: docker-library/official-images

- name: Track official images fork
run: |
cd official-images
git remote add fork https://github.com/nodejs-github-bot/official-images
git fetch fork
git checkout -b node --track fork/node

- name: Generate Stackbrew for diff
run: |
cd docker-node
./generate-stackbrew-library.sh > ../official-images/library/node

- name: Commit Stackbrew changes
run: |
cd official-images
git add -A
git diff-index --quiet HEAD || git commit -m "Node: ${{ github.event.pull_request.title }}" --author="${{ github.actor }} <${{ github.actor }}@users.noreply.github.com>"

- name: Create PR in official-images
id: create-pr
uses: peter-evans/create-pull-request@v3
Expand All @@ -45,17 +58,11 @@ jobs:
push-to-fork: nodejs-github-bot/official-images
path: official-images
branch: node
commit-message: "Node: ${{ github.event.pull_request.title }}"
title: "Node: ${{ github.event.pull_request.title }}"
body: |
Pull Request: ${{ github.event.pull_request.html_url }}
@LaurentGoderre @pesho @PeterDaveHello @SimenB @Starefossen

- name: PR details
run: |
echo "Pull Request Number - ${{ steps.create-pr.outputs.pull-request-number }}"
echo "Pull Request URL - ${{ steps.create-pr.outputs.pull-request-url }}"

- name: Create PR comment
uses: peter-evans/create-or-update-comment@v1
with:
Expand All @@ -64,5 +71,5 @@ jobs:
Created PR on the official-images repo (${{ steps.create-pr.outputs.pull-request-url }}). See https://github.com/docker-library/faq#an-images-source-changed-in-git-now-what if you are wondering when it will be available on the Docker Hub.

- name: Dump context
if: always()
if: failure()
uses: crazy-max/ghaction-dump-context@v1