Skip to content

base

base #236

Workflow file for this run

name: 'base'
on:
push:
paths:
- 'run.sh'
- '.github/workflows/base.yml'
- 'build_*.dockerfile'
- 'run_*.dockerfile'
- 'ls_base.dockerfile'
workflow_dispatch:
schedule:
- cron: '0 0 1,16 * *'
jobs:
base:
strategy:
fail-fast: false
matrix:
include: [
{ distro: arch, version: '' },
{ distro: debian, version: buster },
{ distro: debian, version: bullseye },
{ distro: debian, version: bookworm },
{ distro: fedora, version: 37 },
{ distro: fedora, version: 38 },
{ distro: ubuntu, version: 20 },
{ distro: ubuntu, version: 22 },
{ distro: ls, version: '' },
]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- run: ./run.sh -c $DISTRIBUTION $VERSION
env:
DISTRIBUTION: ${{ matrix.distro }}
VERSION: ${{ matrix.version }}
- name: 'Build ghdl/debug:base'
# We need to use 'buster' because 'gnat-gps' is not available on 'bullseye' or 'bookworm'
if: (matrix.distro == 'debian') && (matrix.version == 'buster')
run: |
docker build -t ghdl/debug:base - <<-EOF
FROM ghdl/build:buster-mcode
RUN apt update -qq && apt install -y python3-pip gnat-gps graphviz gdb \
&& ln -s /usr/bin/pip3 /usr/bin/pip
EOF
- name: 'Build ghdl/build:doc'
if: (matrix.distro == 'debian') && (matrix.version == 'bookworm')
run: |
docker build -t ghdl/build:doc . -f- <<-'EOF'
FROM ghdl/build:bookworm-mcode
RUN apt update -qq && apt install -y python3-pip python3-venv graphviz
ENV VIRTUAL_ENV=/opt/venv
RUN python3 -m venv $VIRTUAL_ENV
ENV PATH="$VIRTUAL_ENV/bin:$PATH"
EOF
- name: Deploy to DockerHub
if: github.event_name != 'pull_request' && github.repository == 'ghdl/docker'
uses: pyTooling/Actions/with-post-step@r0
with:
main: |
# Release
echo '${{ secrets.DOCKER_PASS }}' | docker login docker.io -u '${{ secrets.DOCKER_USER }}' --password-stdin
./run.sh base
post: docker logout docker.io
# FIXIT: ensure that branches different from 'master' do not trigger deploy steps!
# FIXIT: ensure that PR's cannot access/use secrets!