diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 0000000..2b7fcee --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,26 @@ +name: Creates a docker image for production + +on: + push: + branches: [main] + +jobs: + docker: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v1 + with: + fetch-depth: 1 + - name: Docker Build & Push to GitHub Package + uses: opspresso/action-docker@master + with: + args: --docker + env: + USERNAME: "imakecodes" + PASSWORD: ${{ secrets.GH_TOKEN }} + REGISTRY: "docker.pkg.github.com" + DOCKERFILE: "Dockerfile" + IMAGE_NAME: "minesweeper-backend" + TAG_NAME: "main" + LATEST: "true" diff --git a/.github/workflows/stage.yml b/.github/workflows/stage.yml new file mode 100644 index 0000000..187aaa1 --- /dev/null +++ b/.github/workflows/stage.yml @@ -0,0 +1,26 @@ +name: Deploy to stage + +on: + push: + branches: [stage] + +jobs: + docker: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v1 + with: + fetch-depth: 1 + - name: Docker Build & Push to GitHub Package + uses: opspresso/action-docker@master + with: + args: --docker + env: + USERNAME: "imakecodes" + PASSWORD: ${{ secrets.GH_TOKEN }} + REGISTRY: "docker.pkg.github.com" + DOCKERFILE: "Dockerfile" + IMAGE_NAME: "minesweeper-frontend" + TAG_NAME: "stage" + LATEST: "true"