-
Notifications
You must be signed in to change notification settings - Fork 2
42 lines (38 loc) · 1.06 KB
/
docker.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
# Build Docker images and push them to GitHub Container Registry
name: ci/ghcr
on:
push:
branches:
- dockerhub
- master
paths:
- tests/docker/*.Dockerfile
schedule:
- cron: '45 3 4,14,24 * *'
jobs:
docker-build:
name: build-${{ matrix.tag }}
runs-on: ubuntu-latest
strategy:
matrix:
tag:
- bash-3.2
- centos-7
- debian-10
- debian-11
- debian-12
- scop
env:
DOCKER_TAG: ${{ matrix.tag }}
DOCKER_REPO: ghcr.io/sio/bash-complete-partial-path
DOCKER_USER: sio
DOCKER_REGISTRY: ghcr.io
steps:
- uses: actions/checkout@v3
- name: Build image and push it to registry
run: |
export DOCKERFILE=tests/docker/$DOCKER_TAG.Dockerfile
echo ${{ secrets.CONTAINER_REGISTRY_PERSONAL_ACCESS_TOKEN }} \
| docker login -u $DOCKER_USER --password-stdin $DOCKER_REGISTRY
docker build --pull --tag $DOCKER_REPO:$DOCKER_TAG - < $DOCKERFILE
docker push $DOCKER_REPO:$DOCKER_TAG