diff --git a/.gitea/workflows/node-npm.yaml b/.gitea/workflows/node-npm.yaml index e903f0f..d835b8e 100644 --- a/.gitea/workflows/node-npm.yaml +++ b/.gitea/workflows/node-npm.yaml @@ -1,14 +1,14 @@ -name: Build and Push Image +name: Node npm on: schedule: - cron: "@weekly" push: - branches: - - main + branches: [main] paths: - .gitea/workflows/node-npm.yaml - images/actions/node-npm/** - + pull_request: + jobs: build: name: Build and push image @@ -22,18 +22,24 @@ jobs: - name: Set up Docker Buildx uses: https://git.kjan.de/actions/setup-buildx-action@v3 - - name: Login to Docker Registry + - name: Login to local Docker Registry uses: https://git.kjan.de/actions/login-action@v3 with: registry: git.kjan.de username: ${{ secrets.REGISTRY_USERNAME }} password: ${{ secrets.REGISTRY_TOKEN }} + - name: Login to Docker.io Registry + uses: https://git.kjan.de/actions/login-action@v3 + with: + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_PASSWORD }} + - name: Build and push uses: https://git.kjan.de/actions/build-push-action@v5 with: context: ./images/actions/node-npm - push: true + push: ${{ github.ref == 'refs/heads/main' }} tags: | git.kjan.de/actions/node-npm:latest git.kjan.de/actions/node-npm:${{ gitea.run_number }} diff --git a/.gitea/workflows/node-ssh.yaml b/.gitea/workflows/node-ssh.yaml index 2484170..c049f2a 100644 --- a/.gitea/workflows/node-ssh.yaml +++ b/.gitea/workflows/node-ssh.yaml @@ -1,13 +1,13 @@ -name: Build and Push Image +name: Node ssh on: schedule: - cron: "@weekly" push: - branches: - - main + branches: [main] paths: - .gitea/workflows/node-ssh.yaml - images/actions/node-ssh/** + pull_request: jobs: build: @@ -22,18 +22,24 @@ jobs: - name: Set up Docker Buildx uses: https://git.kjan.de/actions/setup-buildx-action@v3 - - name: Login to Docker Registry + - name: Login to local Docker Registry uses: https://git.kjan.de/actions/login-action@v3 with: registry: git.kjan.de username: ${{ secrets.REGISTRY_USERNAME }} password: ${{ secrets.REGISTRY_TOKEN }} + - name: Login to Docker.io Registry + uses: https://git.kjan.de/actions/login-action@v3 + with: + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_PASSWORD }} + - name: Build and push uses: https://git.kjan.de/actions/build-push-action@v5 with: context: ./images/actions/node-ssh - push: true + push: ${{ github.ref == 'refs/heads/main' }} tags: | git.kjan.de/actions/node-ssh:latest git.kjan.de/actions/node-ssh:${{ gitea.run_number }} diff --git a/.gitea/workflows/php-8.2.yaml b/.gitea/workflows/php-8.2.yaml index 076b1af..9895828 100644 --- a/.gitea/workflows/php-8.2.yaml +++ b/.gitea/workflows/php-8.2.yaml @@ -1,13 +1,13 @@ -name: Build and Push Image +name: PHP 8.2 on: schedule: - cron: "@weekly" push: - branches: - - main + branches: [main] paths: - .gitea/workflows/php-8.2.yaml - images/actions/php-8.2/** + pull_request: jobs: build: @@ -22,18 +22,24 @@ jobs: - name: Set up Docker Buildx uses: https://git.kjan.de/actions/setup-buildx-action@v3 - - name: Login to Docker Registry + - name: Login to local Docker Registry uses: https://git.kjan.de/actions/login-action@v3 with: registry: git.kjan.de username: ${{ secrets.REGISTRY_USERNAME }} password: ${{ secrets.REGISTRY_TOKEN }} + - name: Login to Docker.io Registry + uses: https://git.kjan.de/actions/login-action@v3 + with: + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_PASSWORD }} + - name: Build and push uses: https://git.kjan.de/actions/build-push-action@v5 with: context: ./images/actions/php-8.2 - push: true + push: ${{ github.ref == 'refs/heads/main' }} tags: | git.kjan.de/actions/php-8.2:latest git.kjan.de/actions/php-8.2:${{ gitea.run_number }} diff --git a/.gitea/workflows/php-deployer.yaml b/.gitea/workflows/php-deployer.yaml index 5b1d2ab..5801f29 100644 --- a/.gitea/workflows/php-deployer.yaml +++ b/.gitea/workflows/php-deployer.yaml @@ -1,13 +1,13 @@ -name: Build and Push Image +name: PHP deployer on: schedule: - cron: "@weekly" push: - branches: - - main + branches: [main] paths: - .gitea/workflows/php-deployer.yaml - images/actions/php-deployer/** + pull_request: jobs: build: @@ -22,18 +22,24 @@ jobs: - name: Set up Docker Buildx uses: https://git.kjan.de/actions/setup-buildx-action@v3 - - name: Login to Docker Registry + - name: Login to local Docker Registry uses: https://git.kjan.de/actions/login-action@v3 with: registry: git.kjan.de username: ${{ secrets.REGISTRY_USERNAME }} password: ${{ secrets.REGISTRY_TOKEN }} + - name: Login to Docker.io Registry + uses: https://git.kjan.de/actions/login-action@v3 + with: + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_PASSWORD }} + - name: Build and push uses: https://git.kjan.de/actions/build-push-action@v5 with: context: ./images/actions/php-deployer - push: true + push: ${{ github.ref == 'refs/heads/main' }} tags: | git.kjan.de/actions/php-deployer:latest git.kjan.de/actions/php-deployer:${{ gitea.run_number }} diff --git a/.gitea/workflows/rust-node.yaml b/.gitea/workflows/rust-node.yaml index 9f9d7bc..b5ea8af 100644 --- a/.gitea/workflows/rust-node.yaml +++ b/.gitea/workflows/rust-node.yaml @@ -1,13 +1,13 @@ -name: Build and Push Image +name: Rust node on: schedule: - cron: "@weekly" push: - branches: - - main + branches: [main] paths: - .gitea/workflows/rust-node.yaml - images/actions/rust-node/** + pull_request: jobs: build: @@ -22,18 +22,24 @@ jobs: - name: Set up Docker Buildx uses: https://git.kjan.de/actions/setup-buildx-action@v3 - - name: Login to Docker Registry + - name: Login to local Docker Registry uses: https://git.kjan.de/actions/login-action@v3 with: registry: git.kjan.de username: ${{ secrets.REGISTRY_USERNAME }} password: ${{ secrets.REGISTRY_TOKEN }} + - name: Login to Docker.io Registry + uses: https://git.kjan.de/actions/login-action@v3 + with: + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_PASSWORD }} + - name: Build and push uses: https://git.kjan.de/actions/build-push-action@v5 with: context: ./images/actions/rust-node - push: true + push: ${{ github.ref == 'refs/heads/main' }} tags: | git.kjan.de/actions/rust-node:latest git.kjan.de/actions/rust-node:${{ gitea.run_number }}