Skip to content

Commit

Permalink
move locking into build action
Browse files Browse the repository at this point in the history
  • Loading branch information
jiridanek committed Mar 3, 2025
1 parent 77c933c commit 39ff971
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 12 deletions.
11 changes: 11 additions & 0 deletions .github/workflows/build-notebooks-TEMPLATE.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,17 @@ jobs:

# region Image build

- name: Unlock encrypted secrets with git-crypt
if: ${{ inputs.subscription }}
run: |
sudo apt-get update
sudo apt-get install git-crypt
echo "${GIT_CRYPT_KEY}" | base64 --decode > ./git-crypt-key
git-crypt unlock ./git-crypt-key
rm ./git-crypt-key
env:
GIT_CRYPT_KEY: ${{ secrets.GIT_CRYPT_KEY }}

- name: Add subscriptions from GitHub secret
if: ${{ inputs.subscription }}
run: |
Expand Down
12 changes: 0 additions & 12 deletions .github/workflows/build-notebooks-pr-rhel.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,16 +33,6 @@ jobs:
with:
ref: "refs/pull/${{ github.event.number }}/merge"

- name: Unlock encrypted secrets with git-crypt
run: |
sudo apt-get update
sudo apt-get install git-crypt
echo "${GIT_CRYPT_KEY}" | base64 --decode > ./git-crypt-key
git-crypt unlock ./git-crypt-key
rm ./git-crypt-key
env:
GIT_CRYPT_KEY: ${{ secrets.GIT_CRYPT_KEY }}

- name: Determine targets to build based on changed files
run: |
set -x
Expand All @@ -53,8 +43,6 @@ jobs:
--to-ref '${{ github.event.pull_request.head.ref }}' \
--only-rhel
id: gen
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
shell: bash

build:
Expand Down

0 comments on commit 39ff971

Please sign in to comment.