diff --git a/.github/workflows/docker-build-and-push.yml b/.github/workflows/docker-build-and-push.yml index 203f3b9..49f392a 100644 --- a/.github/workflows/docker-build-and-push.yml +++ b/.github/workflows/docker-build-and-push.yml @@ -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.' @@ -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 @@ -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 @@ -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 diff --git a/.github/workflows/xcodebuild-or-fastlane.yml b/.github/workflows/xcodebuild-or-fastlane.yml index 351cb19..ad4bfe2 100644 --- a/.github/workflows/xcodebuild-or-fastlane.yml +++ b/.github/workflows/xcodebuild-or-fastlane.yml @@ -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' @@ -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