From b0499b835aa7fabca9eef0bc62b8c876aeaff26f Mon Sep 17 00:00:00 2001 From: James Jones Date: Mon, 21 Nov 2022 13:44:11 -0500 Subject: [PATCH] Adding on github actions --- .github/workflows/build.yml | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 .github/workflows/build.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..5057d93 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,26 @@ +name: Build podman-dind-like +on: + push: + branches: [ main ] + pull_request: + branches: [ main ] + +jobs: + build: + runs-on: self-hosted + container: + image: registry.fedoraproject.org/fedora:latest + options: --userns=keep-id --privileged --user root + steps: + # Downloads a copy of the code in your repository before running CI tests + - name: Check out repository code + uses: actions/checkout@v3 + - name: Build the Docker image + run: | + if [[ "$GITHUB_REF" =~ ^refs/tags.* ]]; then + VERSION=$GITHUB_REF_NAME + else + VERSION=$(echo "${GITHUB_REF_NAME}" | sed 's|/|-|g') + fi + docker build . --file Dockerfile --tag podman-dind-like:$VERSION +