login token
Some checks failed
checks / Set up Node and other necessary dependencies for Frontend Tests and Build (push) Has been skipped
checks / Set up Java for Backend Tests and Build (push) Has been skipped
Gitea Actions Demo / Explore Gitea Actions - 2 (pull_request) Has been skipped
Gitea Actions Demo 2 / Builder (pull_request) Failing after 31s
checks / Set up Node and other necessary dependencies for Frontend Tests and Build (pull_request) Has been skipped
checks / Set up Java for Backend Tests and Build (pull_request) Has been skipped
Some checks failed
checks / Set up Node and other necessary dependencies for Frontend Tests and Build (push) Has been skipped
checks / Set up Java for Backend Tests and Build (push) Has been skipped
Gitea Actions Demo / Explore Gitea Actions - 2 (pull_request) Has been skipped
Gitea Actions Demo 2 / Builder (pull_request) Failing after 31s
checks / Set up Node and other necessary dependencies for Frontend Tests and Build (pull_request) Has been skipped
checks / Set up Java for Backend Tests and Build (pull_request) Has been skipped
This commit is contained in:
@ -51,9 +51,10 @@ jobs:
|
||||
- name: Build Docker image
|
||||
env:
|
||||
OWNER: ${{ gitea.actor }}
|
||||
IMAGE_NAME: my-app2
|
||||
IMAGE_NAME: my-app
|
||||
run: |
|
||||
#docker build -t $OWNER/my-app:latest .
|
||||
# registry.domain.com/<username>/my-app:latest e.g. git.bepastem.com/eberen/my-app:latest
|
||||
docker build -t $OWNER/$IMAGE_NAME:latest .
|
||||
|
||||
- name: Build and push Docker image using Buildx
|
||||
@ -61,7 +62,7 @@ jobs:
|
||||
GITEA_REGISTRY_URL: ${{ vars.REGISTRY_URL }}
|
||||
#GITEA_REGISTRY_URL: ${{ secrets.REGISTRY_URL }}
|
||||
IMAGE_NAME: my-app-backend
|
||||
APP_VERSION: v1.0.0
|
||||
APP_VERSION: v1.0.0 | 'latest'
|
||||
#IMAGE_NAME: ${{ vars.IMAGE_NAME }}
|
||||
OWNER: ${{ gitea.actor }}
|
||||
run: |
|
||||
@ -81,23 +82,16 @@ jobs:
|
||||
|
||||
- name: Push Docker image to Gitea Registry
|
||||
env:
|
||||
#GITEA_REGISTRY_URL: 'https://git.bepastem.com'
|
||||
#GITEA_REGISTRY_URL: ${{ secrets.GITEA_REGISTRY_URL }}
|
||||
#IMAGE_NAME: ${{ vars.IMAGE_NAME }}
|
||||
GITEA_USERNAME: ${{ gitea.actor }}
|
||||
#GITEA_TOKEN: ${{ secrets.ACCESS_TOKEN }}
|
||||
GITEA_TOKEN: ${{ secrets.ALL_REPO_TOKEN }}
|
||||
LOGIN_TOKEN: ${{ secrets.LOGIN_TOKEN }}
|
||||
#LOGIN_TOKEN: ${{ secrets.LOGIN_TOKEN }}
|
||||
GITEA_REGISTRY_URL: ${{ vars.REGISTRY_URL }}
|
||||
#IMAGE_NAME: ${{ vars.REGISTRY_URL }}/GITEA_USERNAME/my-app2:latest
|
||||
#REGISTRY_URL: ${{ secrets.REGISTRY_URL }}
|
||||
run: |
|
||||
echo "GITEA_REGISTRY_URL: $GITEA_REGISTRY_URL"
|
||||
#docker login $GITEA_REGISTRY_URL -u $GITEA_USERNAME -p $GITEA_TOKEN
|
||||
# Login securely
|
||||
#echo "$GITEA_TOKEN" | docker login "$GITEA_REGISTRY_URL" -u "$GITEA_USERNAME" --password-stdin
|
||||
echo "$LOGIN_TOKEN" | docker login "$GITEA_REGISTRY_URL" -u "$GITEA_USERNAME" --password-stdin
|
||||
docker push $GITEA_REGISTRY_URL/$GITEA_USERNAME/my-app:latest
|
||||
#docker push $GITEA_REGISTRY_URL/$GITEA_USERNAME/$IMAGE_NAME
|
||||
pwd
|
||||
|
||||
|
||||
Reference in New Issue
Block a user