Skip to content

Commit

Permalink
Merge pull request #56043 from code-dot-org/pablo-code-org-patch-3
Browse files Browse the repository at this point in the history
Update ci_pipeline.yml
  • Loading branch information
pablo-code-org committed Jan 27, 2024
2 parents d31f8a2 + 8c8f7fb commit 14169a2
Showing 1 changed file with 9 additions and 18 deletions.
27 changes: 9 additions & 18 deletions .github/workflows/ci_pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,35 +21,26 @@ jobs:
with:
path: code-dot-org

- name: Find and Cache Stale Files
id: stalefiles
- name: Set up GPG Environment
run: |
find code-dot-org -type f -not -path './.git/*' -mtime +730 > stale_files.txt
echo "::set-output name=stale_hash::$(sha256sum stale_files.txt | cut -d ' ' -f1)"
- name: Cache stale files
uses: actions/cache@v2
with:
path: |
$(cat stale_files.txt)
key: ${{ runner.os }}-stale-${{ steps.stalefiles.outputs.stale_hash }}

- name: Fetch and Verify MySQL GPG Key
run: |
# Fetch the GPG key using gpg
gpg --keyserver keyserver.ubuntu.com --recv-keys B7B3B788A8D3785C
# Fetch the GPG key using gpg with the external configuration file
gpg --options gpg.conf --keyserver keyserver.ubuntu.com --recv-keys B7B3B788A8D3785C
# Export the key to a file
gpg --export B7B3B788A8D3785C > mysql.gpg
# Verify the key fingerprint
FINGERPRINT=$(gpg --fingerprint B7B3B788A8D3785C | grep -oP 'THE_EXPECTED_FINGERPRINT')
FINGERPRINT=$(gpg --fingerprint B7B3B788A8D3785C | grep -oP 'B7B3B788A8D3785C')
echo "Extracted Fingerprint: --$FINGERPRINT--"
if [ "$FINGERPRINT" != "THE_EXPECTED_FINGERPRINT" ]; then
if [ "$FINGERPRINT" != "B7B3B788A8D3785C" ]; then
echo "Fingerprint verification failed!"
exit 1
fi
# Continue with the rest of your workflow
env:
GNUPGHOME: ${{ runner.workspace }}/.gnupg

- name: Set up Docker Environment
run: docker build --build-arg MYSQL_GPG_KEY_FILE=mysql.gpg -t code-dot-org-testing-docker-image -f ./code-dot-org/docker/dockerfiles/Dockerfile ./code-dot-org

Expand Down

0 comments on commit 14169a2

Please sign in to comment.