add env variable
All checks were successful
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 28s

This commit is contained in:
2026-02-01 15:09:30 -08:00
parent cca9457769
commit 154e9039c3

View File

@@ -2,6 +2,9 @@ name: Gitea Actions Demo
run-name: ${{ github.actor }} is building and pushing 🚀 run-name: ${{ github.actor }} is building and pushing 🚀
on: [push] on: [push]
env:
REGISTRY: git.chopark.home
jobs: jobs:
Explore-Gitea-Actions: Explore-Gitea-Actions:
runs-on: ubuntu-latest runs-on: ubuntu-latest
@@ -13,12 +16,15 @@ jobs:
# We use single quotes around the secret to prevent shell interpretation # We use single quotes around the secret to prevent shell interpretation
# and the VM IP to bypass the 'server' DNS issue. # and the VM IP to bypass the 'server' DNS issue.
run: | run: |
echo '${{ secrets.ACTIONS_TOKEN }}' | docker login https://git.chopark.home --username ${{ github.actor }} --password-stdin echo '${{ secrets.REGISTRY_TOKEN }}' | \
docker login ${{ env.REGISTRY }} \
--username ${{ gitea.actor }} \
--password-stdin
- name: Build and Push Docker Image - name: Build and Push Docker Image
run: | run: |
docker build -t git.chopark.home/${{ github.repository }}:latest . docker build -t ${{ env.REGISTRY }}/${{ gitea.repository }}:latest .
docker push git.chopark.home/${{ github.repository }}:latest docker push ${{ env.REGISTRY }}/${{ gitea.repository }}:latest
- name: List files in the repository - name: List files in the repository
run: ls ${{ github.workspace }} run: ls ${{ github.workspace }}