From e54594a3a5d4e6aba4cb5076fbc4b716f2d62bf5 Mon Sep 17 00:00:00 2001 From: nomadics9 Date: Thu, 19 Dec 2024 06:06:35 +0300 Subject: [PATCH] workflow: fix --- .github/workflows/buildfin.yml | 37 +++++++++++++++++ .github/workflows/buildseer.yml | 37 +++++++++++++++++ .github/workflows/main.yml | 70 --------------------------------- 3 files changed, 74 insertions(+), 70 deletions(-) create mode 100644 .github/workflows/buildfin.yml create mode 100644 .github/workflows/buildseer.yml delete mode 100644 .github/workflows/main.yml diff --git a/.github/workflows/buildfin.yml b/.github/workflows/buildfin.yml new file mode 100644 index 0000000..5d80e4d --- /dev/null +++ b/.github/workflows/buildfin.yml @@ -0,0 +1,37 @@ +name: Build Alaskarfin + +on: + push: + paths: + - alaskarfin/version.txt + +jobs: + build-alaskarfin: + runs-on: ubuntu-latest + environment: Dockerhub + + steps: + # Step 1: Check out the repository + - name: Checkout code + uses: actions/checkout@v4 + + # Step 2: Set up Docker Buildx + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + + # Step 3: Log in to Docker Hub + - name: Log in to Docker Hub + uses: docker/login-action@v3 + with: + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_PASSWORD }} + + # Step 4: Build and push the Docker image + - name: Build and Push Image + uses: docker/build-push-action@v6 + with: + context: alaskarfin # Path to the build context + file: alaskarfin/Dockerfile # Path to the Dockerfile + push: true # Push the image to Docker Hub + tags: | + nomadics/alaskarfin:latest diff --git a/.github/workflows/buildseer.yml b/.github/workflows/buildseer.yml new file mode 100644 index 0000000..a47e5d3 --- /dev/null +++ b/.github/workflows/buildseer.yml @@ -0,0 +1,37 @@ +name: Build AlaskarSeer + +on: + push: + paths: + - alaskarseer/version.txt + +jobs: + build-alaskarseer: + runs-on: ubuntu-latest + environment: Dockerhub + + steps: + # Step 1: Check out the repository + - name: Checkout code + uses: actions/checkout@v4 + + # Step 2: Set up Docker Buildx + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + + # Step 3: Log in to Docker Hub + - name: Log in to Docker Hub + uses: docker/login-action@v3 + with: + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_PASSWORD }} + + # Step 4: Build and push the alaskarseer image + - name: Build and Push alaskarseer Image + uses: docker/build-push-action@v6 + with: + context: alaskarseer # Path to the build context + file: alaskarseer/Dockerfile # Path to the Dockerfile + push: true + tags: | + nomadics/alaskarseer:latest diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml deleted file mode 100644 index 6380c02..0000000 --- a/.github/workflows/main.yml +++ /dev/null @@ -1,70 +0,0 @@ -name: Build and Push Docker Image - -on: - push: - paths: - - alaskarfin/version.txt - - alaskarseer/version.txt - -jobs: - build-alaskarfin: - runs-on: ubuntu-latest - environment: Dockerhub - if: contains(github.event.head_commit.message, 'alaskarfin/version.txt') - - steps: - # Step 1: Check out the repository - - name: Checkout code - uses: actions/checkout@v4 - - # Step 2: Set up Docker Buildx - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v3 - - # Step 3: Log in to Docker Hub - - name: Log in to Docker Hub - uses: docker/login-action@v3 - with: - username: ${{ secrets.DOCKER_USERNAME }} - password: ${{ secrets.DOCKER_PASSWORD }} - - # Step 4: Build and push the Docker image - - name: Build and Push Image - uses: docker/build-push-action@v6 - with: - context: alaskarfin # Path to the build context - file: alaskarfin/Dockerfile # Path to the Dockerfile - push: true # Push the image to Docker Hub - tags: | - nomadics/alaskarfin:latest - - build-alaskarseer: - runs-on: ubuntu-latest - environment: Dockerhub - if: contains(github.event.head_commit.message, 'alaskarseer/version.txt') - - steps: - # Step 1: Check out the repository - - name: Checkout code - uses: actions/checkout@v4 - - # Step 2: Set up Docker Buildx - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v3 - - # Step 3: Log in to Docker Hub - - name: Log in to Docker Hub - uses: docker/login-action@v3 - with: - username: ${{ secrets.DOCKER_USERNAME }} - password: ${{ secrets.DOCKER_PASSWORD }} - - # Step 4: Build and push the alaskarseer image - - name: Build and Push alaskarseer Image - uses: docker/build-push-action@v6 - with: - context: alaskarseer # Path to the build context - file: alaskarseer/Dockerfile # Path to the Dockerfile - push: true - tags: | - nomadics/alaskarseer:latest