Try fix hip #181
This file contains 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: Build | |
on: | |
push: | |
branches: [master] | |
pull_request: | |
branches: [master] | |
workflow_dispatch: | |
env: | |
DOCKER_BUILDKIT: 1 | |
CR_REPOSITORY: ghcr.io/gridtools/gridtools-base | |
jobs: | |
base: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Build | |
run: > | |
docker build | |
--progress=plain | |
--cache-from $CR_REPOSITORY:base | |
--build-arg BUILDKIT_INLINE_CACHE=1 | |
--tag $CR_REPOSITORY:base | |
--build-arg REPOSITORY=$CR_REPOSITORY | |
base | |
- name: Push | |
if: ${{ (github.event_name == 'push' || github.event_name == 'workflow_dispatch') && github.repository == 'GridTools/gridtools-docker' }} | |
run: > | |
echo ${{ secrets.GITHUB_TOKEN }} | docker login ghcr.io -u $GITHUB_ACTOR --password-stdin && | |
docker push $CR_REPOSITORY:base && | |
docker logout ghcr.io | |
hip: | |
runs-on: ubuntu-latest | |
needs: [base] | |
strategy: | |
matrix: | |
base: [base] | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Build | |
run: > | |
docker build | |
--progress=plain | |
--cache-from $CR_REPOSITORY:${{ matrix.base }} | |
--cache-from $CR_REPOSITORY:${{ matrix.base }}-hip | |
--build-arg BUILDKIT_INLINE_CACHE=1 | |
--tag $CR_REPOSITORY:${{ matrix.base }}-hip | |
--build-arg REPOSITORY=$CR_REPOSITORY | |
--build-arg BASE=${{ matrix.base }} | |
hip | |
- name: Push | |
if: ${{ (github.event_name == 'push' || github.event_name == 'workflow_dispatch') && github.repository == 'GridTools/gridtools-docker' }} | |
run: > | |
echo ${{ secrets.GITHUB_TOKEN }} | docker login ghcr.io -u $GITHUB_ACTOR --password-stdin && | |
docker push $CR_REPOSITORY:${{ matrix.base }}-hip && | |
docker logout ghcr.io |