Skip to content

Commit

Permalink
ci: fixed release workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
nishaq503 committed Jan 29, 2024
1 parent 8d70ac0 commit 791c93b
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 1 deletion.
2 changes: 2 additions & 0 deletions .github/workflows/package-filter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ jobs:
uses: actions/checkout@v4
with:
fetch-depth: 0
ref: ${{ github.event.pull_request.head.sha }}
repository: ${{ github.event.pull_request.head.repo.full_name }}
persist-credentials: false
- name: Find Updated Packages
Expand All @@ -51,6 +52,7 @@ jobs:
else
comparison_point="HEAD~${{ inputs.num-commits }}"
fi
echo "The comparison point is ${comparison_point}"
for changed_file in $(git diff --name-only ${comparison_point}...)
do
Expand Down
11 changes: 10 additions & 1 deletion .github/workflows/package-release.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
name: Package Release

env:
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
DOCKER_TOKEN: ${{ secrets.DOCKER_TOKEN }}

on:
workflow_dispatch:
inputs:
Expand All @@ -8,6 +12,11 @@ on:
required: true
default: 1
type: number
repo_name:
description: 'Name of the base repository. The user can ignore this input if the action is triggered from the base repository.'
required: true
type: string
default: 'image-tools'
workflow_call:
inputs:
repo_name:
Expand Down Expand Up @@ -36,7 +45,7 @@ jobs:
if: github.repository == 'polusai/${{ github.event.inputs.repo_name }}'
uses: ./.github/workflows/package-filter.yml
with:
num-commits: ${{ github.event.inputs.num-commits }}
num-commits: ${{ fromJson(github.event.inputs.num-commits) }}

package-release:
name: Release "${{ matrix.package_name }}"
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
name: Package tests

env:
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
DOCKER_TOKEN: ${{ secrets.DOCKER_TOKEN }}

on:
pull_request:
branches:
Expand Down

0 comments on commit 791c93b

Please sign in to comment.