new workflow
This commit is contained in:
parent
ddd5f59c18
commit
4aec3cdb78
12
.github/workflows/cs-update-push.yml
vendored
12
.github/workflows/cs-update-push.yml
vendored
@ -24,7 +24,17 @@ jobs:
|
||||
TAG=`echo $ISSUE_COMMENT_STRING | jq -r ".tag"`
|
||||
REPO=`echo $ISSUE_COMMENT_STRING | jq -r ".repo"`
|
||||
SENDER=`echo $ISSUE_COMMENT_STRING | jq -r ".sender"`
|
||||
DOCKER_REPO=${{ vars.docker_repo2_registry }}/$REPO
|
||||
|
||||
# Try to extract docker_repo from issue comment, fallback to default variable
|
||||
DOCKER_REPO_FROM_COMMENT=`echo $ISSUE_COMMENT_STRING | jq -r ".docker_repo // empty"`
|
||||
if [ -n "$DOCKER_REPO_FROM_COMMENT" ] && [ "$DOCKER_REPO_FROM_COMMENT" != "null" ]; then
|
||||
DOCKER_REPO=$DOCKER_REPO_FROM_COMMENT
|
||||
echo "Using docker_repo from issue comment: $DOCKER_REPO"
|
||||
else
|
||||
DOCKER_REPO=${{ vars.docker_repo2_registry }}/$REPO
|
||||
echo "Using fallback docker_repo: $DOCKER_REPO"
|
||||
fi
|
||||
|
||||
echo "TAG=$TAG" >> "$GITHUB_OUTPUT";
|
||||
echo "REPO=$REPO" >> "$GITHUB_OUTPUT";
|
||||
echo "SENDER=$SENDER" >> "$GITHUB_OUTPUT";
|
||||
|
||||
7
.github/workflows/cs-update-trigger.yml
vendored
7
.github/workflows/cs-update-trigger.yml
vendored
@ -9,6 +9,10 @@ on:
|
||||
description: 'The cs repo that contains this image'
|
||||
required: true
|
||||
type: string
|
||||
docker_repo:
|
||||
description: 'The name of the action variable containing the docker repo value'
|
||||
required: false
|
||||
type: string
|
||||
|
||||
jobs:
|
||||
trigger-cs-job:
|
||||
@ -32,7 +36,8 @@ jobs:
|
||||
|
||||
- name: Push image name and tag to cs repo's latest issue with label workflow
|
||||
run: |
|
||||
ISSUE_COMMENT_STRING=`echo "{ \"repo\": \"${{ steps.get-id.outputs.REPO }}\", \"tag\": \"${{ steps.get-id.outputs.TAG }}\", \"sender\": \"${{ github.event.sender.login }}\" }" | jq tostring`
|
||||
DOCKER_REPO_VALUE="${{ vars[inputs.docker_repo] }}"
|
||||
ISSUE_COMMENT_STRING=`echo "{ \"docker_repo\": \"$DOCKER_REPO_VALUE\", \"repo\": \"${{ steps.get-id.outputs.REPO }}\", \"tag\": \"${{ steps.get-id.outputs.TAG }}\", \"sender\": \"${{ github.event.sender.login }}\" }" | jq tostring`
|
||||
echo ISSUE_COMMENT_STRING: $ISSUE_COMMENT_STRING
|
||||
|
||||
API_JSON_BODY=`echo '{"body": '$ISSUE_COMMENT_STRING' }' | jq -r tostring`
|
||||
|
||||
2
.gitignore
vendored
2
.gitignore
vendored
@ -129,4 +129,4 @@ dist
|
||||
.yarn/build-state.yml
|
||||
.yarn/install-state.gz
|
||||
.pnp.*
|
||||
|
||||
.idea/
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user