diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 000000000..d9c12006b --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,38 @@ +name: CI + +on: + push: + branches: + - master + - main + pull_request: + +permissions: + contents: read + +jobs: + docker-checks: + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Build html2x image + run: docker build -f "${{ github.workspace }}/html2x/Dockerfile" -t test-html2x "${{ github.workspace }}/html2x" + + - name: Build logo image + run: docker build -f "${{ github.workspace }}/logo/Dockerfile" -t test-logo "${{ github.workspace }}/logo" + + - name: Run html2x container + run: docker run --name test-html2x-container test-html2x + + - name: Run logo container + run: docker run --name test-logo-container -v "${{ github.workspace }}/logo:/data" test-logo + + - name: Print container logs on failure + if: failure() + run: | + docker ps -a || true + docker inspect test-html2x-container > /dev/null 2>&1 && docker logs test-html2x-container || true + docker inspect test-logo-container > /dev/null 2>&1 && docker logs test-logo-container || true diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 8e6b892e9..000000000 --- a/.travis.yml +++ /dev/null @@ -1,28 +0,0 @@ -language: minimal - -services: - - docker - -env: - global: - - CONTMETA_html2x="donnellans/html2x" Dir_html2x="${TRAVIS_BUILD_DIR}/html2x" CONTLOCAL_html2x="test-html2x" - - CONTMETA_logo="donnellans/logo" Dir_logo="${TRAVIS_BUILD_DIR}/logo" CONTLOCAL_logo="test-logo" - -before_install: - - sudo apt-get update && sudo apt-get install -y libseccomp2 - - docker pull debian:stable-slim - - docker build -f "${Dir_html2x}/Dockerfile" -t ${CONTMETA_html2x} ${Dir_html2x} - - docker build -f "${Dir_logo}/Dockerfile" -t ${CONTMETA_logo} ${Dir_logo} - -script: - - docker run --name "${CONTLOCAL_html2x}" ${CONTMETA_html2x} - - docker run --name "${CONTLOCAL_logo}" -v"${Dir_logo}":/data ${CONTMETA_logo} - - -after_error: - - docker logs ${CONTLOCAL_html2x} - - docker logs ${CONTLOCAL_logo} - -after_failure: - - docker logs ${CONTLOCAL_html2x} - - docker logs ${CONTLOCAL_logo} \ No newline at end of file diff --git a/README.md b/README.md index fd904230d..429231581 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -[![Build Status](https://travis-ci.com/donnels/donnels.github.io.svg?branch=master)](https://travis-ci.com/donnels/donnels.github.io) +[![CI](https://github.com/donnels/donnels.github.io/actions/workflows/ci.yml/badge.svg)](https://github.com/donnels/donnels.github.io/actions/workflows/ci.yml) # Sean Donnellan's CV A Jekyll based CV page diff --git a/_config.yml b/_config.yml index 72bf53cc2..0f8d7f825 100644 --- a/_config.yml +++ b/_config.yml @@ -113,8 +113,10 @@ skills: - Cisco - IBM Cloud - IBM - - travis - docker + - containers + - actions + - github - Mentor - Teacher - Project management diff --git a/html2x/Dockerfile b/html2x/Dockerfile index b32f3048b..79893bc5a 100644 --- a/html2x/Dockerfile +++ b/html2x/Dockerfile @@ -10,7 +10,7 @@ # chromium has a headless mode that I'm experimenting with now and can expose a debug port OR print to pdf # netbase was require by phantomjs (I think) -FROM debian:stable-slim as base +FROM debian:bookworm-slim as base #install the base packages that change infrequently RUN mkdir /data \ && DEBIAN_FRONTEND=noninteractive apt-get update \