fix(ci): use token
Some checks failed
CI Pipeline / Build and Push Docker Image (push) Failing after 18s

This commit is contained in:
Aleksandr Tcitlionok
2024-12-11 10:28:16 +00:00
parent 98c7e13914
commit 5c5627ef5e
2 changed files with 1 additions and 49 deletions

View File

@@ -28,7 +28,7 @@ jobs:
with:
registry: ${{ vars.IMAGE_REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
password: ${{ secrets.CI_TOKEN }}
- name: Cache Python dependencies
uses: actions/cache@v3

View File

@@ -1,48 +0,0 @@
name: CI Pipeline
on:
push:
branches:
- main
pull_request:
branches:
- main
env:
IMAGE_REGISTRY: ${{ vars.IMAGE_REGISTRY }}
IMAGE_NAME: ${{ github.repository }}
jobs:
build-and-push:
name: Build and Push Docker Image
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Log in to the Container registry
uses: docker/login-action@v3
with:
registry: ${{ env.IMAGE_REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Cache Python dependencies
uses: actions/cache@v3
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Build and Push Docker Image
uses: docker/build-push-action@v4
with:
push: true
tags: |
${{ env.IMAGE_REGISTRY }}/${{ env.IMAGE_NAME }}:latest
${{ env.IMAGE_REGISTRY }}/${{ env.IMAGE_NAME }}:${{ github.sha }}