Update testing for new Python versions #2
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: distro containers | |
on: | |
push: | |
branches: ["main"] | |
pull_request: | |
branches: ["main"] | |
repository_dispatch: | |
types: rebuild | |
workflow_dispatch: | |
inputs: | |
git-ref: | |
required: false | |
jobs: | |
distros: | |
name: "Container ${{ matrix.distro }}" | |
runs-on: "ubuntu-20.04" | |
strategy: | |
fail-fast: false | |
matrix: | |
distro: [ | |
"alpine", | |
"centos:7", "quay.io/centos/centos:stream8", "quay.io/centos/centos:stream9", | |
"debian:buster", "debian:bullseye", | |
"fedora:35", "fedora:36", | |
"opensuse/leap", | |
"ubuntu:bionic", "ubuntu:focal", "ubuntu:jammy", | |
] | |
steps: | |
- name: checkout | |
uses: "actions/checkout@v3" | |
- name: Define tag | |
run: | | |
suffix="${distro//:/_}" | |
suffix="${suffix////_}" | |
echo "tag=certsysstore:$suffix" >> $GITHUB_ENV | |
env: | |
distro: ${{ matrix.distro }} | |
- name: Create Dockerfile | |
run: | | |
cat > Dockerfile << EOF | |
FROM ${{ matrix.distro }} | |
COPY .github/provision.sh / | |
RUN /provision.sh | |
VOLUME /workdir | |
WORKDIR /workdir | |
COPY .github/entry.sh / | |
ENTRYPOINT /entry.sh | |
EOF | |
- name: "Build container ${{ matrix.distro }}" | |
run: | | |
set -xe | |
docker build . -f Dockerfile -t ${{ env.tag }} | |
- name: "Run container ${{ matrix.distro }}" | |
run: | | |
set -xe | |
docker run --volume $(pwd):/workdir ${{ env.tag }} |