Skip to content

Commit

Permalink
ci: Add Docker build and push workflows for Minimap API
Browse files Browse the repository at this point in the history
- Added a new workflow file `minimap-api-build.yml` to build the Minimap API Docker image.
- Added a new workflow file `minimap-api-push.yml` to push the Minimap API Docker image to DockerHub and GHCR.
- Deleted the old workflow file `minimap-main.yml` which was used for CI testing.

These changes enable automated building and pushing of the Minimap API Docker image.
  • Loading branch information
SakuraIsayeki committed Jul 20, 2023
1 parent b26ea12 commit a2f1df6
Show file tree
Hide file tree
Showing 3 changed files with 52 additions and 71 deletions.
18 changes: 18 additions & 0 deletions .github/workflows/minimap-api-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Build Minimap API Docker Image

on:
push:
paths:
- 'wowskarma_api_minimap/**'
workflow_dispatch:


jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2

- name: Build Docker Image
run: docker build -f wowskarma_api_minimap/Dockerfile.dev -t wowskarma_api_minimap:tag .
34 changes: 34 additions & 0 deletions .github/workflows/minimap-api-push.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Push Minimap API Docker Image

on:
workflow_dispatch:
push:
branches: [ main ]

jobs:
release_dockerhub:
runs-on: ubuntu-latest
steps:
- name: Login to DockerHub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}

- name: Push to DockerHub
run: docker push wowskarma_api_minimap:tag

release_ghcr:
runs-on: ubuntu-latest
steps:
- name: Login to GHCR
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Push to GHCR
run: |
docker tag wowskarma_api_minimap:tag ghcr.io/${{ github.repository }}/wowskarma_api_minimap:tag
docker push ghcr.io/${{ github.repository }}/wowskarma_api_minimap:tag
71 changes: 0 additions & 71 deletions .github/workflows/minimap-main.yml

This file was deleted.

0 comments on commit a2f1df6

Please sign in to comment.