2020-03-05 10:52:50 -05:00
|
|
|
name: CI
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
2020-03-05 12:10:12 -05:00
|
|
|
branches:
|
|
|
|
- master
|
|
|
|
tags:
|
|
|
|
- '*'
|
2020-03-05 10:52:50 -05:00
|
|
|
pull_request:
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
name: build
|
|
|
|
runs-on: ubuntu-latest
|
2020-03-05 13:10:18 -05:00
|
|
|
timeout-minutes: 3
|
2020-03-05 10:52:50 -05:00
|
|
|
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
|