-
Notifications
You must be signed in to change notification settings - Fork 8
39 lines (38 loc) · 1.55 KB
/
release-please.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
name: release-please
on:
push:
branches: [release]
workflow_dispatch:
jobs:
release-please:
if: github.repository == 'MadokaProject/Madoka'
runs-on: ubuntu-latest
steps:
- uses: google-github-actions/release-please-action@v3
id: release
with:
release-type: simple
- name: Check out the repo
if: ${{ steps.release.outputs.release_created }}
uses: actions/checkout@v2
- name: merge-to-master
if: ${{ steps.release.outputs.release_created }}
run: |
git config --global user.email "github-actions[bot]@users.noreply.github.com"
git config --global user.name "github-actions[bot]"
git clone https://github.com/MadokaProject/Madoka.git merge
cd ./merge
git fetch origin
git checkout master
git merge release
git push "https://github-actions[bot]:${{ secrets.GITHUB_TOKEN }}@github.com/MadokaProject/Madoka.git"
- name: publish-docker-image
if: ${{ steps.release.outputs.release_created }}
run: |
echo "Publish v${{ steps.release.outputs.version }} version Docker image"
cd ./merge
docker login -u ${{ secrets.DOCKER_USERNAME }} -p ${{ secrets.DOCKER_PASSWORD }}
docker build -t colsrch/madoka:v${{ steps.release.outputs.version }} .
docker tag colsrch/madoka:v${{ steps.release.outputs.version }} colsrch/madoka:stable
docker push colsrch/madoka:v${{ steps.release.outputs.version }}
docker push colsrch/madoka:stable