Skip to content

Commit

Permalink
Update build_and_push.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
Pasarus authored May 15, 2024
1 parent dbd1933 commit 3cc8c63
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion .github/workflows/build_and_push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,18 @@ jobs:
with:
repository: fiaisis/gitops
token: ${{ secrets.GITOPS_STAGING_EDIT_TOKEN }}

- name: Remove sha256 from the builds digest
id: remove_sha256
run: |
DIGEST=${{ steps.docker_build.outputs.digest }}
FILTERED_DIGEST=${DIGEST#sha256:}
echo "::set-output name=filtered-digest::$FILTERED_DIGEST"
- name: Edit the YAML file watcher file for staging
uses: mikefarah/[email protected]
with:
cmd: yq e -i '.spec.template.spec.containers[] |= (select(.name == "file-watcher-operator") | .env[] |= select(.name == "FILE_WATCHER_SHA256").value = "${{ steps.docker_build.outputs.digest }}")' './components/file-watcher-operator/overlays/staging/file-watcher-operator.yml'
cmd: yq e -i '.spec.template.spec.containers[] |= (select(.name == "file-watcher-operator") | .env[] |= select(.name == "FILE_WATCHER_SHA256").value = "${{ steps.remove_sha256.outputs.filtered-digest }}")' './components/file-watcher-operator/overlays/staging/file-watcher-operator.yml'

- name: Commit and push changes
run: |
Expand Down

0 comments on commit 3cc8c63

Please sign in to comment.