From fb95adcd941783215212d842d416ec101378b82d Mon Sep 17 00:00:00 2001 From: Jonathan LELIEVRE Date: Thu, 7 Nov 2024 16:10:23 +0100 Subject: [PATCH] Add CI that tests building the docker images --- .github/workflows/build.yml | 34 ++++++++++++++++++++++++++++++++++ .github/workflows/publish.yml | 5 ----- 2 files changed, 34 insertions(+), 5 deletions(-) create mode 100644 .github/workflows/build.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 00000000..1427a746 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,34 @@ +--- +name: Build containers + +on: + push: + pull_request: + +jobs: + get_json_versions: + runs-on: ubuntu-latest + steps: + # Fetch versions to work for images + - uses: actions/checkout@v2 + - name: Set up Python 3.8 + uses: actions/setup-python@v2 + with: + python-version: 3.8 + - id: set-versions + run: echo "::set-output name=versions::$(./get_json_versions.py)" + + outputs: + versions: ${{ steps.set-versions.outputs.versions }} + + build_images: + runs-on: ubuntu-latest + needs: publish_base + strategy: + fail-fast: false + matrix: + ps-version: ${{ fromJson(needs.get_json_versions.outputs.versions) }} + steps: + - uses: actions/checkout@v2 + - name: Build Docker image + run: docker build --quiet=true images/${version} diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index a26d72ab..5b67c9fd 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -44,11 +44,6 @@ jobs: if: ${{ github.event_name == 'pull_request' }} working-directory: base - - name: Base Images > Docker Build & Push - if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' && steps.changes.outputs.base != 'true' }} - run: ./docker_tags.sh -p - working-directory: base - - name: Base Images > Docker Build & Push if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' && steps.changes.outputs.base == 'true' }} run: ./docker_tags.sh -p -f