Skip to content

Commit

Permalink
compare latest vcpkg version
Browse files Browse the repository at this point in the history
  • Loading branch information
qrkourier committed Feb 16, 2024
1 parent 8133c1f commit 316bf80
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 1 deletion.
19 changes: 18 additions & 1 deletion .github/workflows/docker-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,13 +73,30 @@ jobs:
# keep major version, e.g., v1, tag updated to latest release
type=semver,pattern=v{{major}},enable=${{startsWith(github.ref, 'refs/tags/v')}}
- name: Find latest vcpkg release
- name: Find latest vcpkg version
id: find_vcpkg
uses: gregziegan/fetch-latest-release@v2.0.0
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
repo_path: "microsoft/vcpkg"

- name: Compare latest to current vcpkg version
shell: bash
run: |
set -o pipefail
LATEST_VCPKG_VERSION="${{ steps.find_vcpkg.outputs.tag_name }}"
CURRENT_VCPKG_VERSION="$(< ./.vcpkg_version)"
if [ "$LATEST_VCPKG_VERSION" != "$CURRENT_VCPKG_VERSION" ]; then
echo "$LATEST_VCPKG_VERSION" > .vcpkg_version
git add .version
git diff --staged --exit-code || (
git config --global user.name 'github-actions[bot]'
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
git commit -m "Updated vcpkg version to ${LATEST_VCPKG_VERSION}"
git push
)
fi
# Build and push Docker image with Buildx (don't push on PR)
# https://github.com/docker/build-push-action
- name: Build and push Docker image
Expand Down
1 change: 1 addition & 0 deletions .vcpkg_version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
2023.06.20

0 comments on commit 316bf80

Please sign in to comment.