-
Notifications
You must be signed in to change notification settings - Fork 0
30 lines (28 loc) · 1.11 KB
/
build-latest.yaml
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
name: Docker build latest image
on:
push:
branches: [dev]
# paths: ['src/**']
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Build and publish a Docker image for ${{ github.repository }}
uses: macbre/push-to-ghcr@master
with:
image_name: ${{ github.repository }} # it will be lowercased internally
github_token: ${{ secrets.PERSONAL_TOKEN }}
dockerfile: ./applications/Dockerfile
- name: clone repo
run: git clone https://${{secrets.PERSONAL_USERNAME}}:${{secrets.PERSONAL_TOKEN}}@github.com/b2network/devops.git
- name: modify
run: cd devops/devops_dev/message-channel/ && sed -i "s/gitTag:.*/gitTag:\ '${{github.sha}}'/g" ${{vars.DEVOPS_PROJECT}}-applications/dev-values*.yaml
- name: commit && push
run: |
cd devops
git config --global user.name ${{secrets.PERSONAL_USERNAME}}
git config --global user.email "[email protected]"
git add .
git commit -m "update gitTag to ${{github.sha}}"
git push origin main