Adding on home registry
This commit is contained in:
16
.github/workflows/build.yml
vendored
16
.github/workflows/build.yml
vendored
@@ -16,6 +16,7 @@ on:
|
||||
|
||||
env:
|
||||
REGISTRY: ghcr.io
|
||||
NEXUS_REGISTRY: nexus.jamjon3.sytes.net:5443
|
||||
|
||||
jobs:
|
||||
build-and-push:
|
||||
@@ -23,6 +24,11 @@ jobs:
|
||||
container:
|
||||
image: quay.io/podman/stable:latest
|
||||
options: --userns=keep-id --privileged --user root
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
language: [ 'python' ]
|
||||
|
||||
steps:
|
||||
# Downloads a copy of the code in your repository before running CI tests
|
||||
- name: Check out repository code
|
||||
@@ -36,6 +42,12 @@ jobs:
|
||||
login-server: ${{ env.REGISTRY }}
|
||||
username: ${{ github.actor }}
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
- name: Docker Login
|
||||
uses: azure/docker-login@v1
|
||||
with:
|
||||
login-server: ${{ env.NEXUS_REGISTRY }}
|
||||
username: ${{ secrets.HOME_NEXUS_DOCKER_USER }}
|
||||
password: ${{ secrets.HOME_NEXUS_DOCKER_PASSWORD }}
|
||||
# This requires docker buildx which podman doesn't support
|
||||
# - name: Extract metadata (tags, labels) for Docker
|
||||
# id: meta
|
||||
@@ -58,10 +70,14 @@ jobs:
|
||||
VERSION=$(echo "${GITHUB_REF_NAME}" | sed 's|/|-|g')
|
||||
fi
|
||||
podman build . --file Dockerfile --tag "$REGISTRY/$IMAGE_NAME:$VERSION"
|
||||
podman tag "$REGISTRY/$IMAGE_NAME:$VERSION" "$NEXUS_REGISTRY/$IMAGE_NAME:$VERSION"
|
||||
podman push "$REGISTRY/$IMAGE_NAME:$VERSION"
|
||||
podman push "$NEXUS_REGISTRY/$IMAGE_NAME:$VERSION"
|
||||
if [[ "$GITHUB_REF" =~ ^refs/tags.* ]]; then
|
||||
podman tag "$REGISTRY/$IMAGE_NAME:$VERSION" "$REGISTRY/$IMAGE_NAME:latest"
|
||||
podman tag "$NEXUS_REGISTRY/$IMAGE_NAME:$VERSION" "$NEXUS_REGISTRY/$IMAGE_NAME:latest"
|
||||
podman push "$REGISTRY/$IMAGE_NAME:latest"
|
||||
podman push "$NEXUS_REGISTRY/$IMAGE_NAME:latest"
|
||||
fi
|
||||
# env:
|
||||
# REG_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
@@ -3,7 +3,7 @@ FROM quay.io/podman/stable:latest
|
||||
# Adding on the docker alias, docker-compose and other useful stuff
|
||||
RUN dnf install -y podman-docker buildah skopeo docker-compose \
|
||||
util-linux ansible-core openssh-clients krb5-devel krb5-libs krb5-workstation git jq unzip coreutils \
|
||||
helm doctl kubernetes-client
|
||||
helm doctl kubernetes-client pinentry
|
||||
|
||||
# Adding some Ansible Key and Timeout setting
|
||||
ENV ANSIBLE_HOST_KEY_CHECKING=False
|
||||
|
||||
Reference in New Issue
Block a user