diff --git a/.github/workflows/docker-publish-qubership-cloud-passport-cli.yml b/.github/workflows/docker-publish-qubership-cloud-passport-cli.yml new file mode 100644 index 0000000..254768d --- /dev/null +++ b/.github/workflows/docker-publish-qubership-cloud-passport-cli.yml @@ -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 }} diff --git a/cp_image/build/requirements.txt b/cp_image/build/requirements.txt index 62b4691..101a2f8 100644 --- a/cp_image/build/requirements.txt +++ b/cp_image/build/requirements.txt @@ -1 +1,2 @@ -cloud_passport_cli==2.3.4 \ No newline at end of file +cloud_passport_cli==2.3.4 +click==8.1.3 \ No newline at end of file