-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
196 additions
and
4 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 |
---|---|---|
@@ -0,0 +1,93 @@ | ||
name: gentoo-ansible Docker Image CI | ||
|
||
on: | ||
push: | ||
branches: [ "master" ] | ||
paths: | ||
- gentoo/ansibl/Dockerfile | ||
- .github/workflows/gentoo-ansible.yml | ||
schedule: | ||
- cron: 0 6 14 * * | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | ||
cancel-in-progress: true | ||
|
||
|
||
jobs: | ||
docker: | ||
runs-on: ubuntu-latest | ||
#runs-on: self-hosted | ||
timeout-minutes: 4320 # 72h | ||
strategy: | ||
fail-fast: false | ||
max-parallel: 1 | ||
matrix: | ||
user: ["apnpucky"] | ||
base: [ "gentoo" ] | ||
image: [ | ||
"ansible", | ||
] | ||
platforms: [ | ||
"linux/amd64,linux/arm64,linux/riscv64" | ||
#,linux/386, linux/ppc64le,linux/arm/v5,linux/arm/v6,linux/arm/v7, #,linux/s390x, | ||
] | ||
ansible: [ "10.2.0" ] | ||
steps: | ||
- | ||
name: Set up version | ||
id: version | ||
run: | | ||
VERSION=${{ matrix.image }} | ||
VERSION=${VERSION//ansible/${{ matrix.ansible }}} | ||
echo "VERSION=$VERSION" >> "$GITHUB_OUTPUT" | ||
- | ||
name: Checkout | ||
uses: actions/checkout@v3 | ||
- | ||
name: Get current time | ||
uses: josStorer/get-current-time@v2.0.2 | ||
id: current-time | ||
with: | ||
format: YYYYMMDDHHSS | ||
- | ||
name: Set up QEMU | ||
uses: docker/setup-qemu-action@v2 | ||
- | ||
name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v2 | ||
with: | ||
config: .github/buildkitd.toml | ||
- | ||
name: Login to Docker Hub | ||
uses: docker/#-action@v2 | ||
with: | ||
username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.DOCKERHUB_TOKEN }} | ||
- | ||
name: abort on existing tag | ||
id: abort | ||
run: | | ||
if docker manifest inspect ${{ matrix.user }}/${{ matrix.base }}-${{ matrix.image }}:${{ steps.version.outputs.VERSION }}-${{ github.sha }}-latest; then | ||
echo "STOP" | ||
echo "STOP=true" >> "$GITHUB_OUTPUT" | ||
else | ||
echo "DONT STOP" | ||
echo "STOP=false" >> "$GITHUB_OUTPUT" | ||
fi | ||
- | ||
name: ${{ matrix.base }}-${{ matrix.image }} | ||
if: steps.abort.outputs.STOP == 'false' | ||
uses: docker/build-push-action@v3 | ||
with: | ||
file: gentoo/ansible/Dockerfile | ||
platforms: ${{ matrix.platforms }} | ||
push: true | ||
target: ${{ matrix.base }}-${{ matrix.image }} | ||
build-args: | | ||
ANSIBLE_VERSION=${{ matrix.ansible }} | ||
tags: | | ||
${{ matrix.user }}/${{ matrix.base }}-${{ matrix.image }}:latest | ||
${{ matrix.user }}/${{ matrix.base }}-${{ matrix.image }}:${{ steps.version.outputs.VERSION }}-latest | ||
${{ matrix.user }}/${{ matrix.base }}-${{ matrix.image }}:${{ steps.version.outputs.VERSION }}-${{ github.sha }}-latest | ||
${{ matrix.user }}/${{ matrix.base }}-${{ matrix.image }}:${{ steps.version.outputs.VERSION }}-${{ steps.current-time.outputs.formattedTime }}-latest |
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,93 @@ | ||
name: gentoo-pre-commit Docker Image CI | ||
|
||
on: | ||
push: | ||
branches: [ "master" ] | ||
paths: | ||
- gentoo/pre-commit/Dockerfile | ||
- .github/workflows/gentoo-pre-commit.yml | ||
schedule: | ||
- cron: 0 6 14 * * | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | ||
cancel-in-progress: true | ||
|
||
|
||
jobs: | ||
docker: | ||
runs-on: ubuntu-latest | ||
#runs-on: self-hosted | ||
timeout-minutes: 4320 # 72h | ||
strategy: | ||
fail-fast: false | ||
max-parallel: 1 | ||
matrix: | ||
user: ["apnpucky"] | ||
base: [ "gentoo" ] | ||
image: [ | ||
"pre-commit", | ||
] | ||
platforms: [ | ||
"linux/amd64,linux/arm/v7,linux/arm64,linux/riscv64" | ||
#,linux/386, linux/arm64,linux/ppc64le,linux/riscv64,linux/arm/v5,linux/arm/v6,linux/arm/v7, #,linux/s390x, | ||
] | ||
pre-commit: [ "3.8.0" ] | ||
steps: | ||
- | ||
name: Set up version | ||
id: version | ||
run: | | ||
VERSION=${{ matrix.image }} | ||
VERSION=${VERSION//pre-commit/${{ matrix.pre-commit }}} | ||
echo "VERSION=$VERSION" >> "$GITHUB_OUTPUT" | ||
- | ||
name: Checkout | ||
uses: actions/checkout@v3 | ||
- | ||
name: Get current time | ||
uses: josStorer/get-current-time@v2.0.2 | ||
id: current-time | ||
with: | ||
format: YYYYMMDDHHSS | ||
- | ||
name: Set up QEMU | ||
uses: docker/setup-qemu-action@v2 | ||
- | ||
name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v2 | ||
with: | ||
config: .github/buildkitd.toml | ||
- | ||
name: Login to Docker Hub | ||
uses: docker/#-action@v2 | ||
with: | ||
username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.DOCKERHUB_TOKEN }} | ||
- | ||
name: abort on existing tag | ||
id: abort | ||
run: | | ||
if docker manifest inspect ${{ matrix.user }}/${{ matrix.base }}-${{ matrix.image }}:${{ steps.version.outputs.VERSION }}-${{ github.sha }}-latest; then | ||
echo "STOP" | ||
echo "STOP=true" >> "$GITHUB_OUTPUT" | ||
else | ||
echo "DONT STOP" | ||
echo "STOP=false" >> "$GITHUB_OUTPUT" | ||
fi | ||
- | ||
name: ${{ matrix.base }}-${{ matrix.image }} | ||
if: steps.abort.outputs.STOP == 'false' | ||
uses: docker/build-push-action@v3 | ||
with: | ||
file: gentoo/pre-commit/Dockerfile | ||
platforms: ${{ matrix.platforms }} | ||
push: true | ||
target: ${{ matrix.base }}-${{ matrix.image }} | ||
build-args: | | ||
PRE_COMMIT_VERSION=${{ matrix.pre-commit }} | ||
tags: | | ||
${{ matrix.user }}/${{ matrix.base }}-${{ matrix.image }}:latest | ||
${{ matrix.user }}/${{ matrix.base }}-${{ matrix.image }}:${{ steps.version.outputs.VERSION }}-latest | ||
${{ matrix.user }}/${{ matrix.base }}-${{ matrix.image }}:${{ steps.version.outputs.VERSION }}-${{ github.sha }}-latest | ||
${{ matrix.user }}/${{ matrix.base }}-${{ matrix.image }}:${{ steps.version.outputs.VERSION }}-${{ steps.current-time.outputs.formattedTime }}-latest |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
FROM apnpucky/gentoo-repo as gentoo-ansible | ||
LABEL maintainer="APN-Pucky" | ||
ARG ANSIBLE_VERSION=10.2.0 | ||
RUN echo 'app-admin/ansible-lint * ~*' > /etc/portage/package.accept_keywords/ansible-lint | ||
RUN emerge -q app-admin/ansible-lint ~app-admin/ansible-${ANSIBLE_VERSION} && rm -rf /var/cache/distfiles/* |
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,5 @@ | ||
# gentoo-ansible | ||
FROM apnpucky/gentoo-repo as gentoo-pre-commit | ||
ARG PRE_COMMIT_VERSION=3.8.0 | ||
RUN echo 'dev-vcs/pre-commit * ~*' > /etc/portage/package.accept_keywords/pre-commit | ||
RUN emerge -q ~dev-vcs/pre-commit-${PRE_COMMIT_VERSION} && rm -rf /var/cache/distfiles/* |