Skip to content

bad.

bad. #63

Workflow file for this run

name: Build images
on: [push]
env:
IMAGE_NAME: fossa/haskell-static-alpine
jobs:
# Push image to Docker Hub using `fossabot` account.
# See also https://docs.docker.com/docker-hub/builds/
build-and-push:
name: ${{ matrix.ghc-version }}-build
runs-on: ubuntu-latest
strategy:
matrix:
include:
- ghc-version: ghc-8.8.4
platform: linux/amd64
- ghc-version: ghc-8.10.7
platform: linux/amd64
- ghc-version: ghc-9.0.2
platform: linux/amd64
- ghc-version: ghc-9.4.7
platform: linux/amd64
- ghc-version: ghc-9.4.8
platform: linux/amd64
- ghc-version: ghc-9.8.2
platform: linux/amd64,linux/arm64
steps:
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- uses: actions/checkout@v2
# - name: Build image
# run: docker build ./${{ matrix.ghc-version }} --platform ${{ matrix.platform }} --tag $IMAGE_NAME:${{ matrix.ghc-version }}
- name: Login to Docker Hub
if: ${{ github.ref == 'refs/heads/master' }}
uses: docker/login-action@v3
with:
username: fossabot
password: ${{ secrets.DOCKER_HUB_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v6
with:
platforms: linux/amd64,linux/arm64
file: ${{ format('./{0}', matrix.ghc-version) }}
push: false # ${{ github.ref == 'refs/heads/master' }}
tags: ${{ format('{0}:{1}', env.IMAGE_NAME, matrix.ghc-version }}

Check failure on line 56 in .github/workflows/build-docker.yml

View workflow run for this annotation

GitHub Actions / Build images

Invalid workflow file

The workflow is not valid. .github/workflows/build-docker.yml (Line: 56, Col: 17): Unexpected end of expression: 'ghc-version'. Located at position 42 within expression: format('{0}:{1}', env.IMAGE_NAME, matrix.ghc-version
# - name: Log into registry
# if: ${{ github.ref == 'refs/heads/master' }}
# run: echo "${{ secrets.DOCKER_HUB_TOKEN }}" | docker login -u fossabot --password-stdin
# - name: Push image
# if: ${{ github.ref == 'refs/heads/master' }}
# run: docker push $IMAGE_NAME:${{ matrix.ghc-version }}