Skip to content

Commit

Permalink
QBRSHP-0000. Added the github workflow for dockerimage
Browse files Browse the repository at this point in the history
  • Loading branch information
andyroode committed Jan 9, 2025
1 parent 8c36cee commit 6e9f967
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 1 deletion.
46 changes: 46 additions & 0 deletions .github/workflows/docker-publish-qubership-cloud-passport-cli.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: Create and publish qubership-cloud-passport-cli docker image

on:
workflow_dispatch:

env:
REGISTRY: ghcr.io
IMAGE_NAME: netcracker/qubership-cloud-passport-cli

jobs:
build-and-push-image:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
attestations: write
id-token: write
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Log in to the Container registry
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}

- name: Build and push Docker image
id: push
uses: docker/build-push-action@v6
with:
context: .
file: ./cp_image/build/Dockerfile
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
build-args: |
GIT_USER=${{ secrets.GIT_USER }}
GIT_TOKEN=${{ secrets.GIT_TOKEN }}
3 changes: 2 additions & 1 deletion cp_image/build/requirements.txt
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
cloud_passport_cli==2.3.4
cloud_passport_cli==2.3.4
click==8.1.3

0 comments on commit 6e9f967

Please sign in to comment.