Skip to content

Commit

Permalink
CodeQL Improvements, Add Environments, And Improve Multiplatform Buil…
Browse files Browse the repository at this point in the history
…ds (#69)

# CodeQL Improvements, Add Environments, And Improve Multiplatform
Builds

## ⚙️ Release Notes 
- CodeQL Improvements
- Add Environments
- Improve Multiplatform Builds


### Code of Conduct & Contributing Guidelines 

By submitting creating this pull request, you agree to follow our [Code
of
Conduct](https://github.com/StanfordBDHG/.github/blob/main/CODE_OF_CONDUCT.md)
and [Contributing
Guidelines](https://github.com/StanfordBDHG/.github/blob/main/CONTRIBUTING.md):
- [x] I agree to follow the [Code of
Conduct](https://github.com/StanfordBDHG/.github/blob/main/CODE_OF_CONDUCT.md)
and [Contributing
Guidelines](https://github.com/StanfordBDHG/.github/blob/main/CONTRIBUTING.md).
  • Loading branch information
PSchmiedmayer authored May 17, 2024
1 parent 88a57f9 commit ea284ce
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 5 deletions.
27 changes: 24 additions & 3 deletions .github/workflows/docker-build-and-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,11 @@ on:
required: false
type: string
default: '.'
environment:
description: 'GitHub deployment environment to optionally adjust access to variables and secrets with additional protection rules: https://docs.github.com/en/actions/deployment/targeting-different-environments/using-environments-for-deployment'
required: false
type: string
default: ''
secrets:
username:
description: 'Username for authenticating to the Docker registry. Uses the GitHub actor by default.'
Expand All @@ -57,7 +62,12 @@ jobs:
platform:
- linux/amd64
- linux/arm64
environment: ${{ inputs.environment }}
steps:
- name: Check environment
run: |
echo "env.selfhosted: ${{ env.selfhosted }}"
echo "environment: ${{ inputs.environment }}"
- uses: actions/checkout@v4
- name: Docker meta
id: meta
Expand Down Expand Up @@ -104,10 +114,16 @@ jobs:
mkdir -p /tmp/digests
digest="${{ steps.build.outputs.digest }}"
touch "/tmp/digests/${digest#sha256:}"
- name: Set transformed platform name
id: set-platform-name
run: |
transformed_platform=${{ matrix.platform }}
transformed_platform=${transformed_platform//\//-}
echo "transformed_platform=$transformed_platform" >> $GITHUB_ENV
- name: Upload digest
uses: actions/upload-artifact@v4
with:
name: digests
name: digests-${{ env.transformed_platform }}-${{ github.run_id }}
path: /tmp/digests/*
if-no-files-found: error
retention-days: 1
Expand All @@ -119,8 +135,13 @@ jobs:
- name: Download digests
uses: actions/download-artifact@v4
with:
name: digests
path: /tmp/digests
name: digests-linux-amd64-${{ github.run_id }}
path: /tmp/digests/
- name: Download digests
uses: actions/download-artifact@v4
with:
name: digests-linux-arm64-${{ github.run_id }}
path: /tmp/digests/
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Docker meta
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/xcodebuild-or-fastlane.yml
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ jobs:
echo -n "${{ secrets.GOOGLE_SERVICE_INFO_PLIST_BASE64 }}" | base64 --decode -o "${{ inputs.googleserviceinfoplistpath }}"
- name: Initialize CodeQL
if: ${{ !env.selfhosted && inputs.codeql }}
uses: github/codeql-action/init@v2
uses: github/codeql-action/init@v3
with:
languages: swift
db-location: '${{ inputs.path }}/.codeql'
Expand Down Expand Up @@ -408,7 +408,7 @@ jobs:
GOOGLE_APPLICATION_CREDENTIALS_BASE64: ${{ secrets.GOOGLE_APPLICATION_CREDENTIALS_BASE64 }}
- name: Perform CodeQL Analysis
if: ${{ !env.selfhosted && inputs.codeql }}
uses: github/codeql-action/analyze@v2
uses: github/codeql-action/analyze@v3
- name: Upload artifact
if: ${{ (success() || failure()) && inputs.artifactname != '' && inputs.buildConfig != 'Release' }}
uses: actions/upload-artifact@v4
Expand Down

0 comments on commit ea284ce

Please sign in to comment.