Skip to content

Update yt documentation (#1832) #14

Update yt documentation (#1832)

Update yt documentation (#1832) #14

name: rocm-diskgalaxy-container
"on":
push:
branches:
- development
pull_request:
branches:
- development
permissions:
contents: read
packages: write
concurrency:
group: rocm-diskgalaxy-container-${{ github.ref }}
cancel-in-progress: true
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
IMAGE_TAG_SHA: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }}
IS_INTERNAL_PR: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository }}
jobs:
check_changes:
uses: ./.github/workflows/check_changes.yml
with:
workflow_file: '.github/workflows/rocm-diskgalaxy-container.yml'
build-and-push:
runs-on: ubuntu-latest
needs: check_changes
if: needs.check_changes.outputs.has_non_docs_changes == 'true'
steps:
- name: Checkout
uses: actions/checkout@v6
with:
submodules: recursive
ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@4d04d5d9486b7bd6fa91e7baf45bbb4f8b9deedd # v4.0.0
- name: Log in to GHCR
if: ${{ github.event_name == 'push' || env.IS_INTERNAL_PR == 'true' }}
uses: docker/login-action@4907a6ddec9925e35a0a9e82d7399ccc52663121 # v4.1.0
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push DiskGalaxy image (development)
if: ${{ github.event_name == 'push' }}
uses: docker/build-push-action@bcafcacb16a39f128d818304e6c9c0c18556b85f # v7.1.0
with:
context: .
file: .github/workflows/dockerfiles/ROCm-DiskGalaxy/Dockerfile
build-args: |
AMREX_MPI=ON
push: true
tags: |
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:rocm-diskgalaxy
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:rocm-diskgalaxy-${{ env.IMAGE_TAG_SHA }}
cache-from: type=gha,scope=rocm-diskgalaxy-container
cache-to: type=gha,mode=max,scope=rocm-diskgalaxy-container
- name: Print DiskGalaxy image URL (development)
if: ${{ github.event_name == 'push' }}
run: |
echo "Built image: docker://${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:rocm-diskgalaxy-${{ env.IMAGE_TAG_SHA }}"
- name: Build and push DiskGalaxy image (PR)
if: ${{ env.IS_INTERNAL_PR == 'true' }}
uses: docker/build-push-action@bcafcacb16a39f128d818304e6c9c0c18556b85f # v7.1.0
with:
context: .
file: .github/workflows/dockerfiles/ROCm-DiskGalaxy/Dockerfile
build-args: |
AMREX_MPI=ON
push: true
tags: |
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:rocm-diskgalaxy-pr-${{ github.event.pull_request.number }}
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:rocm-diskgalaxy-pr-${{ github.event.pull_request.number }}-${{ env.IMAGE_TAG_SHA }}
cache-from: type=gha,scope=rocm-diskgalaxy-container
cache-to: type=gha,mode=max,scope=rocm-diskgalaxy-container
- name: Print DiskGalaxy image URL (PR)
if: ${{ env.IS_INTERNAL_PR == 'true' }}
run: |
echo "Built image: docker://${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:rocm-diskgalaxy-pr-${{ github.event.pull_request.number }}-${{ env.IMAGE_TAG_SHA }}"
- name: Build DiskGalaxy image (PR, no publish)
if: ${{ github.event_name == 'pull_request' && env.IS_INTERNAL_PR != 'true' }}
uses: docker/build-push-action@bcafcacb16a39f128d818304e6c9c0c18556b85f # v7.1.0
with:
context: .
file: .github/workflows/dockerfiles/ROCm-DiskGalaxy/Dockerfile
build-args: |
AMREX_MPI=ON
push: false
tags: rocm-diskgalaxy-pr-${{ github.event.pull_request.number }}:${{ env.IMAGE_TAG_SHA }}
cache-from: type=gha,scope=rocm-diskgalaxy-container
cache-to: type=gha,mode=max,scope=rocm-diskgalaxy-container