add login action
This commit is contained in:
@@ -8,6 +8,10 @@ on:
|
||||
jobs:
|
||||
build-and-push:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
env:
|
||||
REGISTRY_HOST: https://git.home
|
||||
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v3
|
||||
@@ -18,11 +22,10 @@ jobs:
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v3
|
||||
|
||||
- name: Log in to Gitea Container Registry
|
||||
run: |
|
||||
echo "${{ secrets.GITEATOKEN }}" | docker login "${{ env.REGISTRY_HOST }}" -u "${{ github.actor }}" --password-stdin
|
||||
env:
|
||||
REGISTRY_HOST: https://git.home # ← ЗАМЕНИТЕ на ваш домен или IP:порт
|
||||
# - name: Log in to Gitea Container Registry
|
||||
# run: |
|
||||
# echo "${{ secrets.GITEATOKEN }}" | docker login "${{ env.REGISTRY_HOST }}" -u "${{ github.actor }}" --password-stdin
|
||||
|
||||
|
||||
# - name: Extract metadata (tags, labels)
|
||||
# id: meta
|
||||
@@ -35,6 +38,10 @@ jobs:
|
||||
# type=sha,format=short,prefix=
|
||||
# type=ref,event=tag
|
||||
|
||||
- uses: docker/login-action@v2
|
||||
username: ${{ secrets.GIT_USERNAME }}
|
||||
password: ${{ secrets.GIT_PASSWORD }}
|
||||
|
||||
- name: Build and push Docker image
|
||||
uses: docker/build-push-action@v6
|
||||
with:
|
||||
|
||||
Reference in New Issue
Block a user