Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 20 additions & 15 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,27 +64,32 @@ jobs:
steps:
- uses: actions/checkout@v4

#- name: Check qtil-LANGUAGE (src) pack
# id: check_version
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# run: |
# PUBLISHED_VERSION=$(gh api /orgs/advanced-security/packages/container/qtil-${{ matrix.language }}/versions --jq '.[0].metadata.container.tags[0]')
# CURRENT_VERSION=$(grep version ${{ matrix.language }}/src/qlpack.yml | awk '{print $2}')
# echo "Published version: $PUBLISHED_VERSION"
# echo "Local version: $CURRENT_VERSION"
# if [ "$PUBLISHED_VERSION" != "$CURRENT_VERSION" ]; then
# echo "publish=true" >> $GITHUB_OUTPUT
# fi
- name: Check qtil-LANGUAGE (src) pack
id: check_version
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
PUBLISHED_VERSION=$(gh api /orgs/advanced-security/packages/container/qtil-${{ matrix.language }}/versions --jq '.[0].metadata.container.tags[0]')
CURRENT_VERSION=$(grep version ${{ matrix.language }}/src/qlpack.yml | awk '{print $2}')
echo "Published version: $PUBLISHED_VERSION"
echo "Local version: $CURRENT_VERSION"
if [ "$PUBLISHED_VERSION" != "$CURRENT_VERSION" ]; then
echo "publish=true" >> $GITHUB_OUTPUT
else
echo "publish=false" >> $GITHUB_OUTPUT
fi
- name: Log skipped publishing
if: steps.check_version.outputs.publish == 'false'
run: echo "Publishing is skipped as the local version matches the published version."
- name: Setup CodeQL
# if: steps.check_version.outputs.publish == 'true'
if: steps.check_version.outputs.publish == 'true'
uses: ./.github/actions/install-codeql

- name: Publish qtil-LANGUAGE (src) pack
# if: steps.check_version.outputs.publish == 'true'
if: steps.check_version.outputs.publish == 'true'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
echo "Publishing pack 'qtil-${{ matrix.language }}'."
codeql pack install "${{ matrix.language }}/src"
codeql pack publish "${{ matrix.language }}/src"
codeql pack publish --dry-run "${{ matrix.language }}/src"