Skip to content

Commit 85032ae

Browse files
authored
Merge pull request #1337 from ttshivers/github_pr
ci: use github action for automated deployment
2 parents 3a68624 + 07f6f25 commit 85032ae

File tree

5 files changed

+62
-240
lines changed

5 files changed

+62
-240
lines changed

.github/workflows/official-pr.yml

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
name: Create official images PR
2+
3+
on:
4+
pull_request_target:
5+
types:
6+
- closed
7+
8+
paths:
9+
- "**/Dockerfile"
10+
- "**/architectures"
11+
- "**/docker-entrypoint.sh"
12+
- "generate-stackbrew-library.sh"
13+
- "functions.sh"
14+
15+
jobs:
16+
pr:
17+
runs-on: ubuntu-latest
18+
if: github.repository_owner == 'nodejs' && github.event.pull_request.merged_by != ''
19+
20+
steps:
21+
- name: Checkout the docker-node repo
22+
uses: actions/checkout@v2
23+
with:
24+
path: docker-node
25+
fetch-depth: 50
26+
27+
- name: Checkout the official-images repo
28+
uses: actions/checkout@v2
29+
with:
30+
path: official-images
31+
repository: docker-library/official-images
32+
33+
- name: Generate Stackbrew for diff
34+
run: |
35+
cd docker-node
36+
./generate-stackbrew-library.sh > ../official-images/library/node
37+
38+
- name: Create PR in official-images
39+
id: create-pr
40+
uses: peter-evans/create-pull-request@v3
41+
with:
42+
token: ${{ secrets.GH_API_TOKEN }}
43+
push-to-fork: nodejs-github-bot/official-images
44+
path: official-images
45+
branch: node
46+
commit-message: "Node: ${{ github.event.pull_request.title }}"
47+
title: "Node: ${{ github.event.pull_request.title }}"
48+
body: |
49+
Pull Request: ${{ github.event.pull_request.html_url }}
50+
@LaurentGoderre @pesho @PeterDaveHello @SimenB @Starefossen
51+
52+
- name: PR details
53+
run: |
54+
echo "Pull Request Number - ${{ steps.create-pr.outputs.pull-request-number }}"
55+
echo "Pull Request URL - ${{ steps.create-pr.outputs.pull-request-url }}"
56+
57+
- name: Create PR comment
58+
uses: peter-evans/create-or-update-comment@v1
59+
with:
60+
issue-number: ${{ github.event.pull_request.number }}
61+
body: |
62+
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.

.travis.yml

Lines changed: 0 additions & 30 deletions
This file was deleted.

ACTIVE_MAINTAINERS

Lines changed: 0 additions & 5 deletions
This file was deleted.

generate-stackbrew-pr.sh

Lines changed: 0 additions & 168 deletions
This file was deleted.

travis.yml.template

Lines changed: 0 additions & 37 deletions
This file was deleted.

0 commit comments

Comments
 (0)