diff --git a/.gitea/workflows/demo.yaml b/.gitea/workflows/demo.yaml new file mode 100644 index 0000000..ffbfa24 --- /dev/null +++ b/.gitea/workflows/demo.yaml @@ -0,0 +1,26 @@ +name: Gitea Actions Demo +run-name: ${{ github.actor }} is building and pushing 🚀 +on: [push] + +jobs: + Explore-Gitea-Actions: + runs-on: ubuntu-latest + steps: + - name: Check out repository code + uses: actions/checkout@v4 + + - name: Login to Gitea Registry + # We use single quotes around the secret to prevent shell interpretation + # and the VM IP to bypass the 'server' DNS issue. + run: | + echo '${{ secrets.GITEA_TOKEN }}' | docker login git.chopark.home:3000 --username ${{ github.actor }} --password-stdin + + - name: Build and Push Docker Image + run: | + docker build -t git.chopark.home:3000/${{ github.repository }}:latest . + docker push git.chopark.home:3000/${{ github.repository }}:latest + + - name: List files in the repository + run: ls ${{ github.workspace }} + + - run: echo "🍏 Build and Push status is ${{ job.status }}." \ No newline at end of file diff --git a/.gitea/workflows/pipeline.yaml b/.gitea/workflows/pipeline.yaml deleted file mode 100644 index 9a98567..0000000 --- a/.gitea/workflows/pipeline.yaml +++ /dev/null @@ -1,35 +0,0 @@ -name: Build and Deploy -on: - pull_request: - branches: [ master ] - -jobs: - build-and-push: - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v3 - - - name: Login to Registry -# run: echo "${{ secrets.GITEA_TOKEN }}" | docker login 192.168.x.x --username ${{ github.actor }} --password-stdin - run: echo "${{ secrets.GITEA_TOKEN }}" | docker login git.chopark.home --username ${{ github.actor }} --password-stdin - - - name: Build and Push - run: | -# docker build -t 192.168.x.x/${{ github.repository }}:latest . -# docker push 192.168.x.x/${{ github.repository }}:latest - docker build -t git.chopark.home/${{ github.repository }}:latest . - docker push git.chopark.home/${{ github.repository }}:latest - - deploy-to-k8s: - needs: build-and-push - runs-on: ubuntu-latest - steps: - - name: Set Kubeconfig - run: echo "${{ secrets.KUBE_CONFIG }}" > kubeconfig.yaml - - - name: Update Deployment - run: | - export KUBECONFIG=kubeconfig.yaml - # kubectl set image deployment/my-app my-app=192.168.x.x/${{ github.repository }}:latest - kubectl set image deployment/catalog26-deployment catalog26-deployment=git.chopark.home/${{ github.repository }}:latest diff --git a/README.md b/README.md index fa8d20b..f12f29a 100644 --- a/README.md +++ b/README.md @@ -216,5 +216,4 @@ Push it to your Gitea instance. ```bash docker push git.chopark.home/wesscho/catalog26 ``` - -Some comment +third comment