generated from networkservicemesh/cmd-template
-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update common CI files to latest version from networkservicemesh/cmd-…
…template@master networkservicemesh/cmd-template#32 networkservicemesh/cmd-template PR link: networkservicemesh/cmd-template#32 networkservicemesh/cmd-template commit message: commit 220aa9a891bc5b8961b5791ddaddb44f8b7ae1a1 Author: Denis Tingaikin <[email protected]> Date: Fri Nov 6 00:34:45 2020 +0700 Simplify scripts and review comments (#32) Signed-off-by: Denis Tingajkin <[email protected]> Signed-off-by: NSMBot <[email protected]>
- Loading branch information
NSMBot
committed
Nov 5, 2020
1 parent
df2ec9b
commit 116ad17
Showing
4 changed files
with
24 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -164,7 +164,6 @@ jobs: | |
env: | ||
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }} | ||
DOCKER_USER: ${{ secrets.DOCKER_LOGIN }} | ||
TAG: ${GITHUB_SHA::8} | ||
ORG: networkservicemeshci | ||
CGO_ENABLED: 0 | ||
NAME: ${{ github.event.repository.name }} | ||
|
@@ -177,12 +176,12 @@ jobs: | |
with: | ||
go-version: 1.15 | ||
- name: Build ${NAME} image | ||
run: docker build . -t "${ORG}/${NAME}:${TAG}" --target runtime | ||
run: docker build . -t "${ORG}/${NAME}:${GITHUB_SHA::8}" --target runtime | ||
- name: Push ${NAME} image | ||
run: | | ||
docker login -u $DOCKER_USER -p $DOCKER_PASSWORD | ||
docker push "${ORG}/${NAME}:${TAG}" | ||
docker image rm "${ORG}/${NAME}:${TAG}" | ||
docker push "${ORG}/${NAME}:${GITHUB_SHA::8}" | ||
docker image rm "${ORG}/${NAME}:${GITHUB_SHA::8}" | ||
docker push "${ORG}/${NAME}:latest" | ||
docker image rm "${ORG}/${NAME}:latest" | ||
|
@@ -209,23 +208,24 @@ jobs: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
update-integration-k8s-kind: | ||
needs: | ||
- automerge | ||
name: Update integration-k8s-kind | ||
runs-on: ubuntu-latest | ||
if: github.repository != 'networkservicemesh/cmd-template' | ||
if: github.repository != 'networkservicemesh/cmd-template' && github.actor == 'nsmbot' && github.base_ref == 'master' && github.event_name == 'pull_request' | ||
steps: | ||
- name: Checkout repository | ||
- name: Checkout ${{ github.repository }} | ||
uses: actions/checkout@v2 | ||
- name: Find merged PR | ||
uses: jwalton/gh-find-current-pr@v1 | ||
id: findPr | ||
with: | ||
github-token: ${{ github.token }} | ||
path: ${{ github.repository }}S | ||
ref: master | ||
fetch-depth: '0' | ||
- name: Create commit message | ||
working-directory: ${{ github.repository }} | ||
run: | | ||
echo "Update image version of ${{ github.repository }} ${{ github.repository }}#${{ steps.findPr.outputs.pr }}" >> /tmp/commit-message | ||
echo "Update application version to latest version from ${{ github.repository }}@master ${{ github.repository }}#${{ github.event.number }}" >> /tmp/commit-message | ||
echo "" >> /tmp/commit-message | ||
echo "${{ github.repository }} PR link: https://github.com/${{ github.repository }}/pull/${{ steps.findPr.outputs.pr }}" >> /tmp/commit-message | ||
echo "${{ github.repository }} PR link: https://github.com/${{ github.repository }}/pull/${{ github.event.number }}" >> /tmp/commit-message | ||
echo "" >> /tmp/commit-message | ||
echo "${{ github.repository }} commit message:" >> /tmp/commit-message | ||
git log -1 >> /tmp/commit-message | ||
|
@@ -237,9 +237,6 @@ jobs: | |
path: networkservicemesh/integration-k8s-kind | ||
repository: networkservicemesh/integration-k8s-kind | ||
token: ${{ secrets.NSM_BOT_GITHUB_TOKEN }} | ||
- uses: actions/setup-go@v1 | ||
with: | ||
go-version: 1.13.4 | ||
- uses: benjlevesque/[email protected] | ||
id: short-sha | ||
with: | ||
|
@@ -269,7 +266,7 @@ jobs: | |
git config --global user.name "NSMBot" | ||
git commit -s -F /tmp/commit-message | ||
git checkout -b update/"${branchName}" | ||
while [ git push -f origin update/"${branchName}" ]; do | ||
while [ git push origin update/"${branchName}" ]; do | ||
git fetch origin update/"${branchName}" | ||
git rebase origin/update/"${branchName}" | ||
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,19 +11,14 @@ jobs: | |
runs-on: ubuntu-latest | ||
if: github.repository != 'networkservicemesh/cmd-template' | ||
steps: | ||
- name: Checkout repository | ||
- name: Checkout ${{ github.repository }} code | ||
uses: actions/checkout@v2 | ||
- name: Find merged PR | ||
uses: jwalton/gh-find-current-pr@v1 | ||
id: findPr | ||
with: | ||
github-token: ${{ github.token }} | ||
- name: Create commit message | ||
working-directory: ${{ github.repository }} | ||
run: | | ||
echo "Update image version of ${{ github.repository }} ${{ github.repository }}#${{ steps.findPr.outputs.pr }}" >> /tmp/commit-message | ||
echo "Update application version to latest version from ${{ github.repository }}@master ${{ github.repository }}#${{ github.event.number }}" >> /tmp/commit-message | ||
echo "" >> /tmp/commit-message | ||
echo "${{ github.repository }} PR link: https://github.com/${{ github.repository }}/pull/${{ steps.findPr.outputs.pr }}" >> /tmp/commit-message | ||
echo "${{ github.repository }} PR link: https://github.com/${{ github.repository }}/pull/${{ github.event.number }}" >> /tmp/commit-message | ||
echo "" >> /tmp/commit-message | ||
echo "${{ github.repository }} commit message:" >> /tmp/commit-message | ||
git log -1 >> /tmp/commit-message | ||
|
@@ -35,9 +30,6 @@ jobs: | |
path: networkservicemesh/integration-k8s-kind | ||
repository: networkservicemesh/integration-k8s-kind | ||
token: ${{ secrets.NSM_BOT_GITHUB_TOKEN }} | ||
- uses: actions/setup-go@v1 | ||
with: | ||
go-version: 1.13.4 | ||
- uses: benjlevesque/[email protected] | ||
id: short-sha | ||
with: | ||
|