|
| 1 | +name: cyclops-CI |
| 2 | + |
| 3 | +on: |
| 4 | + push: |
| 5 | + tags: |
| 6 | + - '*' |
| 7 | + |
| 8 | +permissions: |
| 9 | + contents: write |
| 10 | + |
| 11 | +jobs: |
| 12 | + build-UI: |
| 13 | + runs-on: ubuntu-latest |
| 14 | + steps: |
| 15 | + - uses: actions/checkout@v2 |
| 16 | + - name: Login to DockerHub |
| 17 | + uses: docker/login-action@v1 |
| 18 | + with: |
| 19 | + username: ${{ secrets.DOCKERHUB_USERNAME }} |
| 20 | + password: ${{ secrets.DOCKERHUB_TOKEN }} |
| 21 | + |
| 22 | + - name: Build and push |
| 23 | + run: | |
| 24 | + TAG=$(git describe --tags --abbrev=0) |
| 25 | +
|
| 26 | + docker build cyclops-ui -t petarcvit223/cyclops-ui:$TAG |
| 27 | + docker push petarcvit223/cyclops-ui:$TAG |
| 28 | +
|
| 29 | + build-controller: |
| 30 | + runs-on: ubuntu-latest |
| 31 | + steps: |
| 32 | + - uses: actions/checkout@v2 |
| 33 | + - name: Login to DockerHub |
| 34 | + uses: docker/login-action@v1 |
| 35 | + with: |
| 36 | + username: ${{ secrets.DOCKERHUB_USERNAME }} |
| 37 | + password: ${{ secrets.DOCKERHUB_TOKEN }} |
| 38 | + |
| 39 | + - name: Build and push |
| 40 | + run: | |
| 41 | + TAG=$(git describe --tags --abbrev=0) |
| 42 | +
|
| 43 | + docker build cyclops-ctrl -t petarcvit223/cyclops-ctrl:$TAG |
| 44 | + docker push petarcvit223/cyclops-ctrl:$TAG |
| 45 | +
|
| 46 | + update-install-manifest: |
| 47 | + runs-on: ubuntu-latest |
| 48 | + steps: |
| 49 | + - uses: actions/checkout@v2 |
| 50 | + - name: update install manifest |
| 51 | + run: | |
| 52 | + TAG=$(git describe --tags --abbrev=0) |
| 53 | + INSTALL_YAML=$GITHUB_WORKSPACE/install/cyclops-install.yaml |
| 54 | +
|
| 55 | + sed -i 's/petarcvit223\/cyclops-ctrl\:.*/petarcvit223\/cyclops-ctrl\:'$TAG'/' $INSTALL_YAML |
| 56 | + sed -i 's/petarcvit223\/cyclops-ui\:.*/petarcvit223\/cyclops-ui\:'$TAG'/' $INSTALL_YAML |
| 57 | +
|
| 58 | + # update file |
| 59 | + git config --global user.email "[email protected]" |
| 60 | + git config --global user.name "petar-cvit" |
| 61 | + git status |
| 62 | + git add . |
| 63 | + git commit -m 'ci update cyclops ctrl to '$TAG |
| 64 | + git push |
0 commit comments