Merge pull request #18 from Phoenix-Commerce/sample-plugin #17
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI Pipeline | |
on: | |
push: | |
branches: | |
- develop | |
pull_request: | |
branches: | |
- develop | |
jobs: | |
lint: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Install Bun | |
run: curl -fsSL https://bun.sh/install | bash | |
shell: bash | |
- name: Set up Bun | |
run: echo "export PATH=/home/runner/.bun/bin:$PATH" >> $GITHUB_ENV | |
- name: Install dependencies | |
run: bun install | |
test: | |
runs-on: ubuntu-latest | |
needs: lint | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Install Bun | |
run: curl -fsSL https://bun.sh/install | bash | |
shell: bash | |
- name: Set up Bun | |
run: echo "export PATH=/home/runner/.bun/bin:$PATH" >> $GITHUB_ENV | |
- name: Install dependencies | |
run: bun install | |
- name: Run tests | |
run: bun test | |
build: | |
runs-on: ubuntu-latest | |
needs: test | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Install Bun | |
run: curl -fsSL https://bun.sh/install | bash | |
shell: bash | |
- name: Set up Bun | |
run: echo "export PATH=/home/runner/.bun/bin:$PATH" >> $GITHUB_ENV | |
- name: Install dependencies | |
run: bun install | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v1 | |
- name: Log in to Docker Hub | |
uses: docker/login-action@v1 | |
with: | |
username: ${{ secrets.DOCKER_USERNAME }} | |
password: ${{ secrets.DOCKER_PASSWORD }} | |
- name: Build and push Docker image | |
run: | | |
docker build -t ${{ secrets.DOCKER_USERNAME }}/your-app-name:latest . | |
docker push ${{ secrets.DOCKER_USERNAME }}/your-app-name:latest |