-
Notifications
You must be signed in to change notification settings - Fork 0
82 lines (74 loc) · 2.17 KB
/
push-test-image.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
name: Test Docker Image Workflow
on:
pull_request:
types:
- opened
- synchronize
- reopened
branches:
- '*'
push:
branches:
- 'release-*'
- '*-release'
- 'release/*'
jobs:
build-and-run-images:
runs-on: ubuntu-latest
steps:
- name: Check out repo
uses: actions/checkout@main
- name: Build and Docker image
uses: docker/build-push-action@master
with:
context: .
platforms: linux/amd64
file: ./Dockerfile
push: false
tags: |
ghcr.io/jvrck/bbripper:${{ github.run_id }}
- name: Run Docker image
run: |
docker run \
-e BB_USER=$BB_USER \
-e BB_WORKSPACE=$BB_WORKSPACE \
-e BB_PASSWORD=$BB_PASSWORD \
ghcr.io/jvrck/bbripper:${{ github.run_id }}
env:
BB_USER: ${{ secrets.BB_USER }}
BB_WORKSPACE: ${{ secrets.BB_WORKSPACE }}
BB_PASSWORD: ${{ secrets.BB_PASSWORD }}
build-and-run-aws-images:
runs-on: ubuntu-latest
steps:
- name: Check out repo
uses: actions/checkout@main
- name: Build and Docker image
uses: docker/build-push-action@master
with:
context: .
platforms: linux/amd64
file: ./Dockerfile
build-args: AWSCLI=TRUE
push: false
tags: |
ghcr.io/jvrck/bbripper:${{ github.run_id }}-aws
- name: Run Docker image
run: |
docker run \
-e BB_USER=$BB_USER \
-e BB_WORKSPACE=$BB_WORKSPACE \
-e BB_PASSWORD=$BB_PASSWORD \
ghcr.io/jvrck/bbripper:${{ github.run_id }}-aws
env:
BB_USER: ${{ secrets.BB_USER }}
BB_WORKSPACE: ${{ secrets.BB_WORKSPACE }}
BB_PASSWORD: ${{ secrets.BB_PASSWORD }}
- name: Run Docker image - Check AWS CLI
run: |
docker run \
ghcr.io/jvrck/bbripper:${{ github.run_id }}-aws aws --version
env:
BB_USER: ${{ secrets.BB_USER }}
BB_WORKSPACE: ${{ secrets.BB_WORKSPACE }}
BB_PASSWORD: ${{ secrets.BB_PASSWORD }}