Skip to content

Commit

Permalink
Create main.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
chbrandt authored Nov 3, 2023
1 parent c66e33b commit eedc37e
Showing 1 changed file with 51 additions and 0 deletions.
51 changes: 51 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: Test sharing images among jobs

# Controls when the action will run. Triggers the workflow on push request, or repository dispatch
on:
# Runs when pushing to 'stable' branch
push:
# branches:
# - 'stable'
# - 'test'
branches-ignore:
- 'master'
tags:
- '*'

# Run in every PR too
pull_request:

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Build image
run: |
docker build -t someimage:xyz github.com/creack/docker-firefox
- name: Save image
run: |
docker save --output /tmp/image.tar someimage:xyz
- name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: myimage
path: /tmp/image.tar

use:
runs-on: ubuntu-latest
needs: build
steps:
- name: Download artifact
uses: actions/download-artifact@v3
with:
name: myimage
path: /tmp
- name: Load image
run: |
docker load --input /tmp/image.tar
docker image ls -a

0 comments on commit eedc37e

Please sign in to comment.