-
Notifications
You must be signed in to change notification settings - Fork 0
52 lines (34 loc) · 1.42 KB
/
container.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
on: push
jobs:
build-container:
name: Build container
runs-on: ubuntu-latest
env:
DOCKER_IMAGE: duccioo/github-database-telegrambot
DOCKER_USERNAME: ${{ secrets.DOCKER_HUB_USERNAME }}
DOCKER_PASSWORD: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
DOCKER_TARGET_PLATFORM: linux/arm/v7
steps:
-
name: Checkout
uses: actions/checkout@v2
- name: Set up Docker Buildx
uses: crazy-max/ghaction-docker-buildx@v1
with:
version: latest
- name: Prepare
if: success()
id: prepare
run: |
echo ::set-output name=docker_platform::${DOCKER_TARGET_PLATFORM}
echo ::set-output name=docker_image::${DOCKER_IMAGE}
echo ::set-output name=version::raspberrypi
- name: Login to Docker Hub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN}}
- name: Run Buildx (push image)
if: success()
run: |
docker buildx build --platform ${{ steps.prepare.outputs.docker_platform }} --tag duccioo/github-database-telegrambot:${{ steps.prepare.outputs.version }} --output type=image,push=true .