18
runs-on: ubuntu-latest
21
uses: actions/checkout@v4
24
uses: actions/setup-node@v4
29
- name: Install dependencies
35
npm run lint -- --no-fix
41
- name: Run circular references check
43
npm run circular-check
49
- name: Upload fluidd.zip
50
uses: actions/upload-artifact@v4
52
name: fluidd-${{ github.sha }}.zip
56
name: Publish Docker Image
58
if: ${{ github.event_name != 'pull_request' }}
59
runs-on: ubuntu-latest
62
uses: actions/checkout@v4
64
- name: Download fluidd.zip
65
uses: actions/download-artifact@v4
67
name: fluidd-${{ github.sha }}.zip
70
- name: Prepare Docker image metadata
72
uses: docker/metadata-action@v5
75
ghcr.io/${{ github.repository }}
77
type=semver,pattern={{raw}}
80
type=raw,value=latest-develop,enable=${{ github.ref == 'refs/heads/develop' }}
81
type=raw,value=latest-master,enable=${{ github.ref == 'refs/heads/master' }}
84
uses: docker/setup-qemu-action@v3
86
- name: Set up Docker Buildx
87
uses: docker/setup-buildx-action@v3
89
- name: Log in to the Container registry
90
uses: docker/login-action@v3
93
username: ${{ github.actor }}
94
password: ${{ secrets.GITHUB_TOKEN }}
96
- name: Build and push Docker image
97
uses: docker/build-push-action@v5
101
platforms: linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64/v8,linux/ppc64le,linux/s390x
103
tags: ${{ steps.docker_meta.outputs.tags }}
104
labels: ${{ steps.docker_meta.outputs.labels }}
109
if: ${{ github.ref == 'refs/heads/develop' }}
110
runs-on: ubuntu-latest
116
uses: actions/checkout@v4
118
- name: Download fluidd.zip
119
uses: actions/download-artifact@v4
121
name: fluidd-${{ github.sha }}.zip
124
- name: Prepare Deploy
126
cp ./server/config.json ./dist/config.json
128
- uses: aws-actions/configure-aws-credentials@v4
130
aws-region: us-east-1
131
role-to-assume: ${{ secrets.AWS_GITHUB_ACTIONS_ROLE }}
133
- name: Deploy to Host
134
uses: reggionick/s3-deploy@v4
137
bucket: ${{ secrets.DEV_S3_BUCKET_NAME }}
138
bucket-region: us-east-1
139
dist-id: ${{ secrets.DEV_CF_DISTRIBUTION_ID }}