From 2531d853a01e179a7e56bb262b916273fbd99d39 Mon Sep 17 00:00:00 2001 From: Sarah Chen Date: Fri, 13 Sep 2024 14:24:59 -0400 Subject: [PATCH] Change trigger to push events and add image test --- .github/workflows/docker.yml | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 6af6d53..ed648d3 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -1,19 +1,10 @@ name: build catadog on: - # for testing - pull_request: + # trigger catadog every time a push occurs on any branch + push: branches: - "**" - # trigger catadog every time a push occurs on any branch - # push: - # branches: - # - "**" - -# map of variables that are available to all jobs in the workflow -# env: -# REGISTRY: ghcr.io -# REPO: datadog/catadog jobs: build: @@ -23,3 +14,7 @@ jobs: uses: actions/checkout@v4 - name: build image run: docker buildx build -t catadog . + - name: test image by starting up a container + run: docker run --rm -it --name catadog catadog + - name: kill container + run: docker container kill catadog