Adding on github actions
This commit is contained in:
10
.github/workflows/build.yml
vendored
10
.github/workflows/build.yml
vendored
@@ -3,17 +3,19 @@ name: Build podman-dind-like
|
|||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- release/*
|
- 'release/**'
|
||||||
- feature/*
|
- 'feature/**'
|
||||||
- develop
|
- develop
|
||||||
|
tags:
|
||||||
|
- '*'
|
||||||
pull_request:
|
pull_request:
|
||||||
branches:
|
branches:
|
||||||
- main
|
- main
|
||||||
|
- 'release/**'
|
||||||
- develop
|
- develop
|
||||||
|
|
||||||
env:
|
env:
|
||||||
REGISTRY: ghcr.io
|
REGISTRY: ghcr.io
|
||||||
# IMAGE_NAME: ${{ github.repository }}
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
@@ -56,7 +58,6 @@ jobs:
|
|||||||
VERSION=$(echo "${GITHUB_REF_NAME}" | sed 's|/|-|g')
|
VERSION=$(echo "${GITHUB_REF_NAME}" | sed 's|/|-|g')
|
||||||
fi
|
fi
|
||||||
podman build . --file Dockerfile --tag "$REGISTRY/$IMAGE_NAME:$VERSION"
|
podman build . --file Dockerfile --tag "$REGISTRY/$IMAGE_NAME:$VERSION"
|
||||||
# echo $REG_TOKEN | podman login ${$REGISTRY} -u ${GITHUB_ACTOR} --password-stdin
|
|
||||||
podman push "$REGISTRY/$IMAGE_NAME:$VERSION"
|
podman push "$REGISTRY/$IMAGE_NAME:$VERSION"
|
||||||
if [[ "$GITHUB_REF" =~ ^refs/tags.* ]]; then
|
if [[ "$GITHUB_REF" =~ ^refs/tags.* ]]; then
|
||||||
podman tag "$REGISTRY/$IMAGE_NAME:$VERSION" "$IMAGE_NAME:latest"
|
podman tag "$REGISTRY/$IMAGE_NAME:$VERSION" "$IMAGE_NAME:latest"
|
||||||
@@ -65,4 +66,3 @@ jobs:
|
|||||||
# env:
|
# env:
|
||||||
# REG_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
# REG_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
# # REG_TOKEN: ${{ secrets.REPO_GITHUB_TOKEN }}
|
# # REG_TOKEN: ${{ secrets.REPO_GITHUB_TOKEN }}
|
||||||
# IMAGE_NAME: jamesjonesconsulting/podman-dind-like
|
|
||||||
|
|||||||
13
README.md
13
README.md
@@ -7,9 +7,18 @@ A Docker-in-Docker like container using Podman
|
|||||||
This takes the quay.io/podman/stable image and extends it with some enhancements to make it more docker like
|
This takes the quay.io/podman/stable image and extends it with some enhancements to make it more docker like
|
||||||
and able to use `docker` as a command as well as includes `docker-compose`.
|
and able to use `docker` as a command as well as includes `docker-compose`.
|
||||||
|
|
||||||
## Notes
|
## Notes on Github Actions
|
||||||
|
|
||||||
This job runs on a self-hosted gitlab agent with the following in the `/etc/gitlab-runner/config.toml` file so this is also compatible with
|
This job runs on a self-hosted Github Actions agent and publishes to Github's container registry ghcr.io as a 'public' image and can be downloaded
|
||||||
|
via a simple docker command or other means as you see fit.
|
||||||
|
|
||||||
|
```
|
||||||
|
docker pull ghcr.io/jamesjonesconsulting/podman-dind-like:latest
|
||||||
|
```
|
||||||
|
|
||||||
|
## Notes on GitLab
|
||||||
|
|
||||||
|
This job also runs on a self-hosted gitlab agent with the following in the `/etc/gitlab-runner/config.toml` file so this is also compatible with
|
||||||
other self-hosted agents for other CI/CD self-hosted agents.
|
other self-hosted agents for other CI/CD self-hosted agents.
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|||||||
Reference in New Issue
Block a user