Update artifacts-in-reusable-called.yml #94
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Service Containers Cached | |
on: | |
workflow_dispatch: | |
push: | |
jobs: | |
container-job: | |
runs-on: ubuntu-latest | |
services: | |
nginx: | |
image: nginx | |
ports: | |
- 8080:80 | |
steps: | |
- run: mkdir -p ~/docker-image-cache | |
- id: docker-image-cache | |
uses: actions/cache@v1 | |
with: | |
path: ~/docker-image-cache | |
key: docker-image-cache-${{ runner.os }} | |
- if: steps.image-cache.outputs.cache-hit != 'true' | |
run: | | |
docker pull nginx | |
docker save -o ~/docker-image-cache/nginx.tar nginx | |
- if: steps.image-cache.outputs.cache-hit == 'true' | |
run: docker load -i ~/docker-image-cache/nginx.tar | |
- run: sudo apt-get update && sudo apt-get install -y telnet | |
- run: telnet nginx 80 |