init #2
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Container | |
| on: | |
| push: | |
| branches: [ "main" ] | |
| pull_request: | |
| branches: [ "main" ] | |
| workflow_dispatch: | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
| cancel-in-progress: true | |
| env: | |
| IMAGE_TAGS: latest ${{ github.sha }} | |
| TEST_IMAGE_TAG: ${{ github.sha }} | |
| IMAGE_REGISTRY: ghcr.io/${{ github.repository_owner }} | |
| REGISTRY_USER: ${{ github.actor }} | |
| REGISTRY_PASSWORD: ${{ github.token }} | |
| permissions: | |
| contents: read | |
| packages: write | |
| jobs: | |
| container: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 300 | |
| steps: | |
| - name: Harden Runner | |
| uses: step-security/harden-runner@4d991eb9b905ef189e4c376166672c3f2f230481 # v2.11.0 | |
| with: | |
| egress-policy: audit | |
| - name: Delete huge unnecessary tools folder | |
| run: rm -rf /opt/hostedtoolcache | |
| - name: Check out | |
| if: always() | |
| uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1 | |
| with: | |
| fetch-depth: 0 | |
| - name: Build Image with dependencies | |
| run: | | |
| DOCKERFILE=Dockerfile.dependencies-cuda NEW_IMAGE=ghcr.io/trilinos/dependencies-cuda:latest ./buildImage.sh | |
| - name: Push To GHCR | |
| uses: redhat-actions/push-to-registry@5ed88d269cf581ea9ef6dd6806d01562096bee9c # v2.8 | |
| id: push_dependencies | |
| with: | |
| image: ghcr.io/trilinos/dependencies-cuda | |
| tags: latest | |
| registry: ${{ env.IMAGE_REGISTRY }} | |
| username: ${{ env.REGISTRY_USER }} | |
| password: ${{ env.REGISTRY_PASSWORD }} | |
| extra-args: | | |
| --disable-content-trust | |
| - name: Build Image with Trilinos | |
| run: | | |
| DOCKERFILE=Dockerfile.trilinos-cuda NEW_IMAGE=ghcr.io/trilinos/trilinos-cuda:latest ./buildImage.sh | |
| - name: Push To GHCR | |
| uses: redhat-actions/push-to-registry@5ed88d269cf581ea9ef6dd6806d01562096bee9c # v2.8 | |
| id: push_trilinos | |
| with: | |
| image: ghcr.io/trilinos/trilinos-cuda | |
| tags: latest | |
| registry: ${{ env.IMAGE_REGISTRY }} | |
| username: ${{ env.REGISTRY_USER }} | |
| password: ${{ env.REGISTRY_PASSWORD }} | |
| extra-args: | | |
| --disable-content-trust |