Skip to content

Commit

Permalink
Merge pull request #397 from lsst-epo/more-workflow-fixes
Browse files Browse the repository at this point in the history
Fix K8S trigger
  • Loading branch information
blnkt authored Mar 6, 2024
2 parents 4852b92 + f40b45c commit 947b09e
Showing 1 changed file with 13 additions and 10 deletions.
23 changes: 13 additions & 10 deletions .github/workflows/build-and-push.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:
- 'develop'
- 'master'
tags:
- 'v.*'
- 'v*'
pull_request:
types:
- 'opened'
Expand All @@ -24,8 +24,8 @@ jobs:
name: Build Container Image
runs-on: ubuntu-latest
outputs:
image_tag: ${{ steps.deploy-info.outputs.image_tag }}
image_name: ${{ steps.deploy-info.outputs.image_name }}
image_tag: ${{ steps.deploy-tag.outputs.image_tag }}
image_name: ${{ steps.deploy-tag.outputs.image_name }}
environment_name: ${{ steps.deploy-info.outputs.environment_name }}
steps:
-
Expand All @@ -48,13 +48,6 @@ jobs:
fi
echo environment_name=$environment_name >> "$GITHUB_OUTPUT"
echo credentials_json=$credentials_json >> "$GITHUB_OUTPUT"
# Parse container image tag to deploy
full_tag=$(echo "$DOCKER_METADATA_OUTPUT_JSON" | jq -r '.tags[] | limit(1; select(. | test(":sha-|:v.")))')
echo "Will use tag \"$full_tag\" for deployment."
echo image_tag=$(echo "$full_tag" | cut -f2 -d:) >> "$GITHUB_OUTPUT"
echo image_name=$(echo "$full_tag" | cut -f1 -d:) >> "$GITHUB_OUTPUT"
echo full_tag=$full_tag >> "$GITHUB_OUTPUT"
-
name: Docker meta
id: meta
Expand All @@ -78,6 +71,16 @@ jobs:
type=sha
build-args: |
RUN_BUILD=false
-
name: Get deploy tag
id: deploy-tag
run: |
# Parse container image tag to deploy
full_tag=$(echo "$DOCKER_METADATA_OUTPUT_JSON" | jq -r '.tags[] | limit(1; select(. | test(":sha-|:v.")))')
echo "Will use tag \"$full_tag\" for deployment."
echo image_tag=$(echo "$full_tag" | cut -f2 -d:) >> "$GITHUB_OUTPUT"
echo image_name=$(echo "$full_tag" | cut -f1 -d:) >> "$GITHUB_OUTPUT"
echo full_tag=$full_tag >> "$GITHUB_OUTPUT"
-
name: Set up QEMU
uses: docker/setup-qemu-action@v2
Expand Down

0 comments on commit 947b09e

Please sign in to comment.