diff options
| author | pml68 <contact@pml68.me> | 2024-12-02 00:20:58 +0100 |
|---|---|---|
| committer | pml68 <contact@pml68.me> | 2024-12-02 00:30:42 +0100 |
| commit | faaf37c95442a1b839aa0571f21b05062b426ed4 (patch) | |
| tree | dd15bfc066c6d07719564823139f0114d1fb4dc6 /.github/workflows | |
| parent | docs: update README (diff) | |
| download | nvim-faaf37c95442a1b839aa0571f21b05062b426ed4.tar.gz | |
feat: add "no-tex" docker image
Diffstat (limited to '')
| -rw-r--r-- | .github/workflows/docker.yml | 27 |
1 files changed, 20 insertions, 7 deletions
diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 6a2f5fd..7778d04 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -12,6 +12,18 @@ env: jobs: push: + strategy: + matrix: + image: [ + { + dockerfile: 'Dockerfile', + tag: '' + }, + { + dockerfile: 'Dockerfile.no-tex', + tag: 'no-tex-' + }, + ] runs-on: ubuntu-latest permissions: packages: write @@ -21,7 +33,7 @@ jobs: - uses: actions/checkout@v4 - name: Build image - run: docker build . --file Dockerfile --tag $IMAGE_NAME --label "runnumber=${GITHUB_RUN_ID}" + run: docker build . --file ${{ matrix.image.dockerfile }} --tag $IMAGE_NAME --label "runnumber=${GITHUB_RUN_ID}" - name: Log in to registry run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin @@ -31,10 +43,11 @@ jobs: IMAGE_ID=ghcr.io/${{ github.repository_owner }}/$IMAGE_NAME IMAGE_ID=$(echo $IMAGE_ID | tr '[A-Z]' '[a-z]') - VERSION=$(echo "${{ github.ref }}" | sed -e 's,.*/\(.*\),\1,') - [[ "${{ github.ref }}" == "refs/tags/"* ]] && VERSION=$(echo $VERSION | sed -e 's/^v//') - [ "$VERSION" == "master" ] && VERSION=latest + TAG=$(echo "${{ github.ref }}" | sed -e 's,.*/\(.*\),\1,') + [[ "${{ github.ref }}" == "refs/tags/"* ]] && TAG=$(echo $TAG | sed -e 's/^v//') + [ "$TAG" == "master" ] && TAG="latest" + TAG=${{ matrix.image.tag }}$TAG echo IMAGE_ID=$IMAGE_ID - echo VERSION=$VERSION - docker tag $IMAGE_NAME $IMAGE_ID:$VERSION - docker push $IMAGE_ID:$VERSION + echo TAG=$TAG + docker tag $IMAGE_NAME $IMAGE_ID:$TAG + docker push $IMAGE_ID:$TAG |
