Adding on github actions

This commit is contained in:
James Jones
2022-11-21 16:46:19 -05:00
parent df3bee661d
commit cc8ebbb200
2 changed files with 16 additions and 7 deletions

View File

@@ -3,17 +3,19 @@ name: Build podman-dind-like
on:
push:
branches:
- release/*
- feature/*
- 'release/**'
- 'feature/**'
- develop
tags:
- '*'
pull_request:
branches:
- main
- 'release/**'
- develop
env:
REGISTRY: ghcr.io
# IMAGE_NAME: ${{ github.repository }}
jobs:
build:
@@ -56,7 +58,6 @@ jobs:
VERSION=$(echo "${GITHUB_REF_NAME}" | sed 's|/|-|g')
fi
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"
if [[ "$GITHUB_REF" =~ ^refs/tags.* ]]; then
podman tag "$REGISTRY/$IMAGE_NAME:$VERSION" "$IMAGE_NAME:latest"
@@ -65,4 +66,3 @@ jobs:
# env:
# REG_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# # REG_TOKEN: ${{ secrets.REPO_GITHUB_TOKEN }}
# IMAGE_NAME: jamesjonesconsulting/podman-dind-like

View File

@@ -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
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.
```