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