diff --git a/.github/workflows/docker_release.yml b/.github/workflows/docker_release.yml new file mode 100644 index 0000000..7e22db0 --- /dev/null +++ b/.github/workflows/docker_release.yml @@ -0,0 +1,41 @@ +name: Build Dev Docker + +on: + push: + tags: + - "**" + +jobs: + build-docker: + runs-on: ubuntu-latest + steps: + - name: ⬇️ Checkout + uses: actions/checkout@v3 + + - name: 🛠️ Set up Docker Buildx + uses: docker/setup-buildx-action@v2 + + - name: 🔒 Login to ghcr.io + uses: docker/login-action@v2 + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: 🛠️ Get branch name + id: branch-name + uses: tj-actions/branch-names@v5.4 + + - name: 🛠️ Set tag + run: | + echo "tag=${{ steps.branch-name.outputs.current_branch }}" >> $GITHUB_ENV + + - name: 🔨 Build and push Docker + uses: docker/build-push-action@v3 + with: + push: true + context: . + tags: | + ghcr.io/sebclem/claptrapbot-ui:${{ env.tag }} + ghcr.io/sebclem/claptrapbot-ui:latest + file: ./Dockerfile diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml deleted file mode 100644 index 6b550ea..0000000 --- a/.github/workflows/node.js.yml +++ /dev/null @@ -1,25 +0,0 @@ -# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node -# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions - -name: Node.js CI - -on: - push: - branches: ["main"] - -jobs: - build: - runs-on: ubuntu-latest - steps: - - name: ⬇️ Checkout - uses: actions/checkout@v3 - - name: ⚒️ Use Node.js 16.x - uses: actions/setup-node@v3 - with: - node-version: 16.x - cache: "yarn" - - name: 🔨 Install dependencies - run: yarn install --immutable - - - name: 🔨 Build app - run: yarn build --mode staging