From 676cae2f85471aeff6776463c72881ebd902dcf9 Mon Sep 17 00:00:00 2001
From: Nick Adcock <nick.adcock@docker.com>
Date: Thu, 5 Mar 2020 15:52:50 +0000
Subject: [PATCH] Add basic CI workflow to test action works

Signed-off-by: Nick Adcock <nick.adcock@docker.com>
---
 .github/workflows/main.yml | 32 ++++++++++++++++++++++++++++++++
 Dockerfile                 |  3 +++
 2 files changed, 35 insertions(+)
 create mode 100644 .github/workflows/main.yml
 create mode 100644 Dockerfile

diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml
new file mode 100644
index 0000000..555e355
--- /dev/null
+++ b/.github/workflows/main.yml
@@ -0,0 +1,32 @@
+name: CI
+
+on:
+  push:
+  pull_request:
+
+jobs:
+  build:
+    name: build
+    runs-on: ubuntu-latest
+    steps:
+
+    - name: Checkout
+      uses: actions/checkout@v2
+    
+    - name: Run local registry
+      run: docker run -d -p 5000:5000 registry:2
+    
+    - name: Build and push image
+      uses: ./
+      env:
+        DOCKER_BUILDKIT: 1
+      with:
+        registry: localhost:5000
+        repository: temp/workflow
+        tags: foo
+      
+    - name: Remove local image
+      run: docker image rm localhost:5000/temp/workflow:foo
+
+    - name: Run image from registry
+      run: docker run localhost:5000/temp/workflow:foo
diff --git a/Dockerfile b/Dockerfile
new file mode 100644
index 0000000..65f31c8
--- /dev/null
+++ b/Dockerfile
@@ -0,0 +1,3 @@
+FROM alpine:3
+
+ENTRYPOINT ["echo", "docker github actions"]