From afa5548e8dd9a4665e52acad65f9359e41d367b5 Mon Sep 17 00:00:00 2001 From: Ben Woodward Date: Sun, 28 Feb 2021 10:34:29 -0800 Subject: Github Actions CI (#20) Replace CircleCI with Github Actions --- .circleci/config.yml | 33 --------------------------------- .github/workflows/master_push.yml | 23 +++++++++++++++++++++++ .github/workflows/pull_request.yml | 15 +++++++++++++++ Makefile | 1 - README.md | 2 +- 5 files changed, 39 insertions(+), 35 deletions(-) delete mode 100644 .circleci/config.yml create mode 100644 .github/workflows/master_push.yml create mode 100644 .github/workflows/pull_request.yml diff --git a/.circleci/config.yml b/.circleci/config.yml deleted file mode 100644 index f40a34c..0000000 --- a/.circleci/config.yml +++ /dev/null @@ -1,33 +0,0 @@ -version: 2 -jobs: - build: - docker: - - image: circleci/node - steps: - - checkout - - setup_remote_docker: - version: 19.03.13 - - run: make build - - build_and_publish: - docker: - - image: circleci/node - steps: - - checkout - - setup_remote_docker: - version: 19.03.13 - - run: make build - - run: make publish - -workflows: - version: 2 - build: - jobs: - - build: - filters: - branches: - ignore: master - - build_and_publish: - filters: - branches: - only: master diff --git a/.github/workflows/master_push.yml b/.github/workflows/master_push.yml new file mode 100644 index 0000000..7c56fec --- /dev/null +++ b/.github/workflows/master_push.yml @@ -0,0 +1,23 @@ +name: ci +on: + push: + branches: master +jobs: + build-and-publish: + runs-on: ubuntu-latest + steps: + - + name: Checkout + uses: actions/checkout@v2 + - + name: Set up Docker + uses: docker/setup-buildx-action@v1 + - + name: Login to DockerHub + uses: docker/login-action@v1 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + - + name: Build and publish + run: make build publish diff --git a/.github/workflows/pull_request.yml b/.github/workflows/pull_request.yml new file mode 100644 index 0000000..5a2ee16 --- /dev/null +++ b/.github/workflows/pull_request.yml @@ -0,0 +1,15 @@ +name: ci +on: pull_request +jobs: + build: + runs-on: ubuntu-latest + steps: + - + name: Checkout + uses: actions/checkout@v2 + - + name: Set up Docker + uses: docker/setup-buildx-action@v1 + - + name: Build + run: make build diff --git a/Makefile b/Makefile index 421bb16..3ac82a2 100644 --- a/Makefile +++ b/Makefile @@ -20,7 +20,6 @@ run: .PHONY: publish publish: - @docker login -u $(DOCKER_USER) -p $(DOCKER_PASS) docker push $(TAG_LATEST) @docker tag $(TAG_LATEST) $(TAG_COMMIT) docker push $(TAG_COMMIT) diff --git a/README.md b/README.md index 1c992df..0df9331 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -[![CircleCI](https://circleci.com/gh/bndw/wifi-card.svg?style=svg)](https://circleci.com/gh/bndw/wifi-card) +![ci](https://github.com/bndw/wifi-card/workflows/ci/badge.svg) # 📶 WiFi Card -- cgit v1.2.3