forked from decidim/docker
-
Notifications
You must be signed in to change notification settings - Fork 0
95 lines (91 loc) · 3.21 KB
/
dockerhub.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
name: Build docker images
on:
workflow_dispatch:
schedule:
# Every day at 17:30, we udpdate images
- cron: '30 17 * * *'
jobs:
decidim-026:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Login to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Publish Decidim 026
run: |
npm install -g doctoc
export REGISTERY_USERNAME=${{ secrets.DOCKERHUB_USERNAME }}
export DECIDIM_VERSION_BRANCHES=release/0.26-stable
export REGISTERY_PUSH=true
./update-registery.rb
decidim-027:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Login to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Publish Decidim 027
run: |
npm install -g doctoc
export REGISTERY_USERNAME=${{ secrets.DOCKERHUB_USERNAME }}
export DECIDIM_VERSION_BRANCHES=release/0.27-stable
export REGISTERY_PUSH=true
./update-registery.rb
decidim-develop:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Login to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Publish Decidim Develop
run: |
npm install -g doctoc
export REGISTERY_USERNAME=${{ secrets.DOCKERHUB_USERNAME }}
export DECIDIM_VERSION_BRANCHES=develop
export REGISTERY_PUSH=true
./update-registery.rb
update-and-publish:
runs-on: ubuntu-latest
needs: [decidim-026, decidim-027, decidim-develop]
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Login to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Update README
run: |
npm install -g doctoc
export REGISTERY_USERNAME=${{ secrets.DOCKERHUB_USERNAME }}
export DECIDIM_VERSION_BRANCHES=release/0.26-stable,release/0.27-stable,develop
./update-documentation.rb
- name: Push README
run: |
docker run --rm -e DOCKER_USER=${{ secrets.DOCKERHUB_USERNAME }} \
-v $(pwd):/myvol \
-e DOCKER_PASS=${{ secrets.DOCKERHUB_TOKEN }} \
-e PUSHRM_SHORT="Decidim docker images" \
-e PUSHRM_TARGET="docker.io/${{ secrets.DOCKERHUB_USERNAME }}/decidim" \
-e PUSHRM_DEBUG=1 \
-e PUSHRM_FILE=/myvol/README.md chko/docker-pushrm
- name: Commit and push changes
run: |
git config --global user.name "Github Actions"
git config --global user.email "[email protected]"
git add .
git diff-index --quiet HEAD || git commit -m "Update files from update script"
git push