Skip to content

Commit

Permalink
Migrate es repo
Browse files Browse the repository at this point in the history
  • Loading branch information
alexyao2015 committed Jul 19, 2021
1 parent 709761a commit 3db8f13
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/docker-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,13 @@ jobs:
elif [[ "${{ github.event.client_payload.tagged }}" == "true" ]]; then
# Build tag/release version
ES_VERSION=$(wget \
-qO - https://api.github.com/repos/pliablepixels/zmeventnotification/releases/latest \
-qO - https://api.github.com/repos/ZoneMinder/zmeventnotification/releases/latest \
| awk '/tag_name/{print $4;exit}' FS='[""]')
ZM_VERSION=${{ github.event.client_payload.zm_version }}
else
# Build from latest ES commit
ES_VERSION=$(wget \
-qO - https://api.github.com/repos/pliablepixels/zmeventnotification/commits/master \
-qO - https://api.github.com/repos/ZoneMinder/zmeventnotification/commits/master \
| awk '/sha/{print $4;exit}' FS='[""]')
ZM_VERSION="main"
fi
Expand Down
8 changes: 5 additions & 3 deletions .github/workflows/update-version.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v2
with:
token: ${{ secrets.GHCR_PAT }}
- name: Update
id: update
run: |
Expand All @@ -22,21 +24,21 @@ jobs:
| awk '/tag_name/{print $4;exit}' FS='[""]')
es_version=$(wget \
--no-check-certificate -qO - \
https://api.github.com/repos/pliablepixels/zmeventnotification/releases/latest \
https://api.github.com/repos/ZoneMinder/zmeventnotification/releases/latest \
| awk '/tag_name/{print $4;exit}' FS='[""]')
export VERSION="zm_v${zm_version}-es_${es_version}"
echo "::set-output name=version::${VERSION}"
- name: Push tag
id: tag_version
run: |
set -x
git config user.name "${GITHUB_ACTOR}"
git config user.email "${GITHUB_ACTOR}@users.noreply.github.com"
git config user.password "${{ secrets.GHCR_PAT }}"
git fetch --tags
if [ $(git tag -l "${{ steps.update.outputs.version }}") ]; then
echo "Tag ${{ steps.update.outputs.version }} already exists! Skipping tag creation."
else
echo "Creating tag ${{ steps.update.outputs.version }}"
git tag -l "${{ steps.update.outputs.version }}"
git tag "${{ steps.update.outputs.version }}"
git push origin "${{ steps.update.outputs.version }}"
fi

0 comments on commit 3db8f13

Please sign in to comment.