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 @@ -19,30 +19,35 @@ jobs:
steps:
- uses: actions/checkout@v4

#- name: Check core qtil (src) pack
# id: check_version
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# run: |
# PUBLISHED_VERSION=$(gh api /orgs/advanced-security/packages/container/qtil/versions --jq '.[0].metadata.container.tags[0]')
# CURRENT_VERSION=$(grep version 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 core qtil (src) pack
id: check_version
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
PUBLISHED_VERSION=$(gh api /orgs/advanced-security/packages/container/qtil/versions --jq '.[0].metadata.container.tags[0]')
CURRENT_VERSION=$(grep version 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 core qtil (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'."
codeql pack install "src"
codeql pack publish "src"
codeql pack publish --dry-run "src"
Copy link

Copilot AI Jul 21, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The --dry-run flag suggests this is for testing purposes. Consider adding a comment or workflow input parameter to control when dry-run mode should be used versus actual publishing.

Suggested change
codeql pack publish --dry-run "src"
if [ "${{ inputs.dry-run }}" == "true" ]; then
codeql pack publish --dry-run "src"
else
codeql pack publish "src"
fi

Copilot uses AI. Check for mistakes.

publish_langs:
runs-on: ubuntu-latest
Expand Down