forked from fkie/fivefilters-full-text-rss-docker
-
Notifications
You must be signed in to change notification settings - Fork 35
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3 from heussd/bakentest
Introduce tests and Docker bake
- Loading branch information
Showing
6 changed files
with
74 additions
and
54 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,40 +1,47 @@ | ||
name: Docker build and push | ||
name: Build, test and push Docker images | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
paths-ignore: | ||
- '**.md' | ||
- 'docker-compose.yml' | ||
schedule: | ||
- cron: '0 13 * * 0' | ||
|
||
push: | ||
paths-ignore: | ||
- '**.md' | ||
schedule: | ||
- cron: '0 13 * * 0' | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
|
||
steps: | ||
- name: checkout code | ||
uses: actions/checkout@v2 | ||
|
||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v1 | ||
with: | ||
platforms: all | ||
- 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@v1 | ||
with: | ||
version: latest | ||
- 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: Login to docker hub | ||
run: echo "${{ secrets.DOCKER_PASSWORD }}" | docker login -u "${{ secrets.DOCKER_USERNAME }}" --password-stdin | ||
|
||
- name: build the image | ||
run: | | ||
docker buildx build --push \ | ||
--tag heussd/fivefilters-full-text-rss:latest \ | ||
--platform linux/amd64,linux/arm64,linux/arm/v7,linux/arm/v6 . | ||
- name: Build amd64 image | ||
run: | | ||
docker buildx bake amd64 --load | ||
- name: Test amd64 image | ||
run: | | ||
docker compose up --no-build --pull never -d | ||
sleep 5s | ||
curl --fail 'http://localhost:80' | ||
curl --fail 'http://localhost:80/makefulltextfeed.php?url=sec%3A%2F%2Fwww.tagesschau.de%2Findex~rss2.xml&max=1&links=preserve' | ||
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
variable "IMAGE" { | ||
default = "heussd/fivefilters-full-text-rss:latest" | ||
} | ||
|
||
group "default" { | ||
targets = ["all"] | ||
} | ||
|
||
target "all" { | ||
tags = ["${IMAGE}"] | ||
platforms = ["linux/amd64", "linux/arm64", "linux/arm/v7", "linux/arm/v6"] | ||
} | ||
|
||
target "amd64" { | ||
tags = ["${IMAGE}"] | ||
platforms = ["linux/amd64"] | ||
} |
This file was deleted.
Oops, something went wrong.