forked from fkie/fivefilters-full-text-rss-docker
-
Notifications
You must be signed in to change notification settings - Fork 34
49 lines (43 loc) · 1.43 KB
/
build-and-push.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
name: Build, test and push Docker images
on:
push:
paths-ignore:
- '**.md'
schedule:
- cron: '0 13 * * 0'
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
with:
platforms: all
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v3
with:
version: latest
- name: Login to docker hub
run: echo "${{ secrets.DOCKER_PASSWORD }}" | docker login -u "${{ secrets.DOCKER_USERNAME }}" --password-stdin
- name: Build amd64 image
run: |
docker buildx bake amd64 --load
- uses: actions/setup-node@v4
with:
node-version: 'latest'
- name: Test amd64 image
run: |
docker compose up --no-build --pull never -d
sleep 5s
npx rest-cli calls.http --show headers
docker compose down
- name: Build all images
run: |
docker buildx bake
- name: Release images to Dockerhub
if: github.ref == 'refs/heads/master'
run: |
docker buildx bake --push