-
Notifications
You must be signed in to change notification settings - Fork 487
Build own docker images for integration tests #901
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 6 commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
a0406f4
Build own docker images and upload to ghcr
dklimpel 65ce170
update md5 sum for dockerfiles
dklimpel 373e5af
minor text updates
dklimpel d38fce0
Remove outdated lines from Dockerfile_arch
dklimpel e31c124
Merge branch 'master' into build_docker
dklimpel 2abe0f5
generate the list of dockerfiles dynamically
dklimpel d595098
Merge branch 'master' into build_docker
dklimpel c5a0cc4
update wheezy checksum
dklimpel 0cb9ddd
fix line endings
dklimpel 47ca341
Merge remote-tracking branch 'origin/master' into build_docker
dklimpel 6fc0ba1
disable automatic builds
dklimpel 1c701d3
Merge branch 'master' into build_docker
dklimpel 5ccb39c
bump httpd version for rockylinux
dklimpel File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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,80 @@ | ||
| name: Docker images for integration tests | ||
|
|
||
| on: | ||
| push: | ||
| branches: | ||
| - master | ||
| workflow_dispatch: | ||
|
|
||
| env: | ||
| PLATFORMS: "linux/amd64" | ||
|
|
||
| jobs: | ||
| list-dockerfiles: | ||
| name: Create list of existing dockerfiles | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@v4 | ||
| - name: Get file list | ||
| id: set-matrix | ||
| run: | | ||
| # lists all Dockerfile_* and ignore (grep) files with extension (e.g. *.md5) | ||
| # tranforms the file list in JSON array (StackOverflow#10234327) | ||
| # converts the list into objects of dockerfile and image name | ||
| ls integration-tests/Dockerfile_* | | ||
| grep -Ev "\..{0,3}$" | | ||
| jq -R -s 'split("\n")[:-1]' | | ||
| jq '. | map({dockerfile: ., image: sub(".*_"; "")})' > filelist.json | ||
| echo "matrix=$(jq -c . filelist.json)" >> "$GITHUB_OUTPUT" | ||
| outputs: | ||
| matrix: ${{ steps.set-matrix.outputs.matrix }} | ||
|
|
||
| docker: | ||
| needs: [list-dockerfiles] | ||
| name: Build and push Docker image | ||
| runs-on: ubuntu-latest | ||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| include: ${{ fromJson(needs.list-dockerfiles.outputs.matrix) }} | ||
| permissions: | ||
| packages: write | ||
| contents: read | ||
|
|
||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@v4 | ||
| with: | ||
| fetch-depth: 0 | ||
|
|
||
| - name: Set up QEMU | ||
| uses: docker/setup-qemu-action@v3 | ||
|
|
||
| - name: Set up Docker Buildx | ||
| uses: docker/setup-buildx-action@v3 | ||
|
|
||
| - name: Login to GHCR | ||
| uses: docker/login-action@v3 | ||
| with: | ||
| registry: ghcr.io | ||
| username: ${{ github.repository_owner }} | ||
| password: ${{ secrets.GITHUB_TOKEN }} | ||
|
|
||
| - name: Extract metadata (tags, labels) for Docker | ||
| id: meta | ||
| uses: docker/metadata-action@v5 | ||
| with: | ||
| images: | | ||
| ghcr.io/${{ github.repository_owner }}/${{ matrix.image }} | ||
|
|
||
| - name: Build and push tag | ||
| uses: docker/build-push-action@v5 | ||
| with: | ||
| context: . | ||
| file: ${{ matrix.dockerfile }} | ||
| push: true | ||
| tags: | | ||
| ghcr.io/${{ github.repository_owner }}/${{ matrix.image }}:latest | ||
| labels: ${{ steps.meta.outputs.labels }} | ||
| platforms: ${{ env.PLATFORMS }} | ||
This file contains hidden or 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,7 +1,6 @@ | ||
| FROM base/archlinux | ||
| FROM archlinux:base | ||
| MAINTAINER @siddharthist | ||
|
|
||
| RUN pacman -Sy --noconfirm systemd-sysvcompat | ||
| RUN ln -s /does_not_exist /foo && \ | ||
| chmod 700 ~root | ||
| RUN mkfifo /pipe |
This file contains hidden or 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 +1 @@ | ||
| 7743af2cd089e92858eca1715db25949 Dockerfile_arch | ||
| 8fc3ce0c000f89ab09488cccb3ba8e66 Dockerfile_arch |
This file contains hidden or 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 hidden or 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 +1 @@ | ||
| 485a260105b0f1da058fa4af863e2ecc Dockerfile_wheezy | ||
| 108ad55356203510134e3e76199236e0 Dockerfile_wheezy |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.