Skip to content
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

Add initial GHCR build workflow #1

Merged
merged 2 commits into from
Apr 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
60 changes: 60 additions & 0 deletions .github/workflows/docker-image.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
name: Docker Image CI

on:
push:
branches: [ "main" ]
tags: [ 'v*.*.*' ]
pull_request:
branches: [ "main" ]

jobs:
pre-commit:
runs-on: self-hosted
steps:
- name: Run pre-commit
run: |
pip install pre-commit
pre-commit install-hooks
pre-commit run -a --color=always --show-diff-on-failure
build_operator_image:
runs-on: self-hosted
steps:
- name: 'Checkout GitHub Action'
uses: actions/checkout@main
- name: 'Login to GitHub Container Registry'
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{github.actor}}
password: ${{secrets.GITHUB_TOKEN}}
- uses: actions/checkout@v3
- name: Build the Docker image
run: |
if [[ $GITHUB_REF == 'refs/heads/main' ]]; then
TAG=latest
else
TAG=$(echo ${GITHUB_HEAD_REF:-${GITHUB_REF#refs/tags/}}| tr / -)
fi
docker build . --file Dockerfile --tag ghcr.io/dell/remote-development-operator:$TAG
docker push ghcr.io/dell/remote-development-operator:$TAG
build_devenv_image:
runs-on: self-hosted
steps:
- name: 'Checkout GitHub Action'
uses: actions/checkout@main
- name: 'Login to GitHub Container Registry'
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{github.actor}}
password: ${{secrets.GITHUB_TOKEN}}
- uses: actions/checkout@v3
- name: Build the Docker image
run: |
if [[ $GITHUB_REF == 'refs/heads/main' ]]; then
TAG=latest
else
TAG=$(echo ${GITHUB_HEAD_REF:-${GITHUB_REF#refs/tags/}}| tr / -)
fi
docker build . --file Dockerfile --tag ghcr.io/dell/remote-development-operator/devenv:$TAG
docker push ghcr.io/dell/remote-development-operator/devenv:$TAG
227 changes: 0 additions & 227 deletions .gitlab-ci.yml

This file was deleted.

2 changes: 1 addition & 1 deletion operator/chart/values.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
image:
repository: 702886132326.dkr.ecr.eu-west-1.amazonaws.com/eo-images-gitlab/remote-development-operator
repository: ghcr.io/dell/remote-development-operator
tag: main
Loading