Add initial GHCR build workflow #6
Workflow file for this run
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
name: Docker Image CI | |
on: | |
push: | |
branches: [ "main" ] | |
pull_request: | |
branches: [ "main" ] | |
jobs: | |
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: | | |
DT=$(date +%s) | |
docker build . --file Dockerfile --tag ghcr.io/dell/remote-development-operator:$DT | |
docker push ghcr.io/dell/remote-development-operator:$DT | |
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: | | |
DT=$(date +%s) | |
docker build . --file Dockerfile --tag ghcr.io/dell/remote-development-operator/devenv:$DT | |
docker push ghcr.io/dell/remote-development-operator/devenv:$DT |