diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 56d901d..c919b98 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -83,17 +83,17 @@ jobs: DOCKER_SNAPSHOT_IMAGE_HISTORY_URL=$(echo https://hub.docker.com/layers/${DOCKER_USERNAME}/${DOCKER_IMAGENAME}/${DOCKER_SNAPSHOT}/images/${DOCKER_DIGEST}) git clone --depth=1 https://${GITHUB_ACTOR}:${{ secrets.GITHUB_TOKEN }}@github.com/${GITHUB_REPOSITORY}.wiki.git wiki cd wiki - LINE=$(grep -n "add $DOCKER_TAGNAME msg after this line" Home.md | cut -d ":" -f 1) - head -n $LINE Home.md > tmp.md + LINE=$(grep -n "add $DOCKER_TAGNAME msg after this line" ${{ matrix.ros-distro }}.md | cut -d ":" -f 1) + head -n $LINE ${{ matrix.ros-distro }}.md > tmp.md echo "* \`${DOCKER_DIGEST_SHORT}\`" | tee -a tmp.md echo " * uploaded on $(date --iso-8601="minutes")" | tee -a tmp.md echo " * ${{ steps.jobs.outputs.html_url }}" | tee -a tmp.md echo " * snapshot" | tee -a tmp.md echo " * [\`${DOCKER_SNAPSHOT}\`](${DOCKER_SNAPSHOT_IMAGE_HISTORY_URL})" | tee -a tmp.md - tail -n +$(( $LINE+1 )) Home.md >> tmp.md - mv tmp.md Home.md + tail -n +$(( $LINE+1 )) ${{ matrix.ros-distro }}.md >> tmp.md + mv tmp.md ${{ matrix.ros-distro }}.md git config --local user.email "${GIT_CONFIG_EMAIL}" git config --local user.name "${GIT_CONFIG_USER}" - git add Home.md - git commit -m "Update Home.md" - git push origin master + git add ${{ matrix.ros-distro }}.md + git commit -m "Update ${{ matrix.ros-distro }}.md" + git fetch origin && git merge origin/master --no-edit && git push origin master