From 0c662e585dead2b843e475d59c90e57d9b6916a8 Mon Sep 17 00:00:00 2001 From: Chad Hutchins Date: Sun, 29 Nov 2020 09:47:40 -0800 Subject: [PATCH 1/3] Create docker-build-pr.yml A GitHub action for testing Pull Requests by building the Docker container --- .github/workflows/docker-build-pr.yml | 31 +++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 .github/workflows/docker-build-pr.yml diff --git a/.github/workflows/docker-build-pr.yml b/.github/workflows/docker-build-pr.yml new file mode 100644 index 0000000..b59b942 --- /dev/null +++ b/.github/workflows/docker-build-pr.yml @@ -0,0 +1,31 @@ +name: Docker Build for Pull Request + +on: + pull_request: + branches: [ main ] + +jobs: + path-context: + runs-on: ubuntu-latest + steps: + - + name: Checkout + uses: actions/checkout@v2 + - + name: Set up QEMU + uses: docker/setup-qemu-action@v1 + - + name: Set up Docker Buildx + uses: docker/setup-buildx-action@v1 + - + name: Build + uses: docker/build-push-action@v2 + with: + context: . + file: ./Dockerfile + platforms: linux/arm32v7 + push: false + tags: chadhutchins182/rtlsdr-airband-arm32v7:$(date +%s) + build-args: | + VERSION=v3.2.1 + PLATFORM=armv7-generic From 7c54b903b238a7135013acfb26250c72f32a578b Mon Sep 17 00:00:00 2001 From: Chad Hutchins Date: Sun, 29 Nov 2020 10:01:51 -0800 Subject: [PATCH 2/3] Update docker-build-pr.yml Use Get Current Date step for tag --- .github/workflows/docker-build-pr.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/docker-build-pr.yml b/.github/workflows/docker-build-pr.yml index b59b942..ef1c51d 100644 --- a/.github/workflows/docker-build-pr.yml +++ b/.github/workflows/docker-build-pr.yml @@ -8,6 +8,9 @@ jobs: path-context: runs-on: ubuntu-latest steps: + - name: Get current date + id: date + run: echo "::set-output name=date::$(date +'%Y-%m-%d')" - name: Checkout uses: actions/checkout@v2 @@ -25,7 +28,7 @@ jobs: file: ./Dockerfile platforms: linux/arm32v7 push: false - tags: chadhutchins182/rtlsdr-airband-arm32v7:$(date +%s) + tags: chadhutchins182/rtlsdr-airband-arm32v7:${{steps.date.outputs.date}} build-args: | VERSION=v3.2.1 PLATFORM=armv7-generic From de43eb77961148434c73dc6e344d04b96e5a0846 Mon Sep 17 00:00:00 2001 From: Chad Hutchins Date: Sun, 29 Nov 2020 10:16:25 -0800 Subject: [PATCH 3/3] Update docker-build-pr.yml Add hour, minute, and seconds --- .github/workflows/docker-build-pr.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/docker-build-pr.yml b/.github/workflows/docker-build-pr.yml index ef1c51d..c7b60fb 100644 --- a/.github/workflows/docker-build-pr.yml +++ b/.github/workflows/docker-build-pr.yml @@ -10,7 +10,7 @@ jobs: steps: - name: Get current date id: date - run: echo "::set-output name=date::$(date +'%Y-%m-%d')" + run: echo "::set-output name=date::$(date +'%Y-%m-%d-%H%M.%S')" - name: Checkout uses: actions/checkout@v2