From a191f3ca5b88bbfef1fe0527911d3ad540b02480 Mon Sep 17 00:00:00 2001 From: Omar Faruk Date: Mon, 27 May 2024 23:25:47 +0100 Subject: [PATCH] Fixed branch on workflow --- .github/workflows/docker-image.yml | 68 +++++++++++++++--------------- .github/workflows/main.yml | 26 ------------ 2 files changed, 34 insertions(+), 60 deletions(-) delete mode 100644 .github/workflows/main.yml diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml index 490c9ab..9760afa 100644 --- a/.github/workflows/docker-image.yml +++ b/.github/workflows/docker-image.yml @@ -1,44 +1,44 @@ name: Docker Image CI on: - push: - branches: ["main"] - pull_request: - branches: ["main"] + push: + branches: ["master"] + pull_request: + branches: ["master"] env: - REGISTRY: ghcr.io - IMAGE_NAME: ${{ github.repository }} + REGISTRY: ghcr.io + IMAGE_NAME: ${{ github.repository }} jobs: - push_to_registry: - name: Push Docker image to Docker Hub - runs-on: ubuntu-latest - permissions: - packages: write - contents: read - steps: - - name: Check out the repo - uses: actions/checkout@v4 + push_to_registry: + name: Push Docker image to Docker Hub + runs-on: ubuntu-latest + permissions: + packages: write + contents: read + steps: + - name: Check out the repo + uses: actions/checkout@v4 - - name: Docker Login - uses: docker/login-action@v3.1.0 - with: - registry: ${{ env.REGISTRY }} - username: ${{ github.actor }} - password: ${{ secrets.GHCR_PASSWORD }} + - name: Docker Login + uses: docker/login-action@v3.1.0 + with: + registry: ${{ env.REGISTRY }} + username: ${{ github.actor }} + password: ${{ secrets.GHCR_PASSWORD }} - - name: Extract metadata (tags, labels) for Docker - id: meta - uses: docker/metadata-action@v5 - with: - images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} + - name: Extract metadata (tags, labels) for Docker + id: meta + uses: docker/metadata-action@v5 + with: + images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} - - name: Build and push Docker image - uses: docker/build-push-action@v5 - with: - context: . - file: ./dockerfile - push: true - tags: ${{ steps.meta.outputs.tags }} - labels: ${{ steps.meta.outputs.labels }} + - name: Build and push Docker image + uses: docker/build-push-action@v5 + with: + context: . + file: ./dockerfile + push: true + tags: ${{ steps.meta.outputs.tags }} + labels: ${{ steps.meta.outputs.labels }} diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml deleted file mode 100644 index e8436a4..0000000 --- a/.github/workflows/main.yml +++ /dev/null @@ -1,26 +0,0 @@ -name: Package - -on: - workflow_dispatch: - push: - branches: [ "main" ] - paths-ignore: - - '**/*.md' - - '.gitignore' - - '.editorconfig' - -jobs: - build-and-publish: - runs-on: ubuntu-latest - permissions: - contents: write - steps: - - uses: actions/checkout@v3 - - name: Sync files - uses: SamKirkland/FTP-Deploy-Action@4.3.0 - with: - server: ${{ secrets.DEPLOY_FTP_SERVER }} - username: ${{ secrets.DEPLOY_FTP_USERNAME }} - password: ${{ secrets.DEPLOY_FTP_PASSWORD }} - server-dir: /fonts/ -