diff options
-rw-r--r-- | .github/workflows/build-and-publish.yml | 15 |
1 files changed, 1 insertions, 14 deletions
diff --git a/.github/workflows/build-and-publish.yml b/.github/workflows/build-and-publish.yml index 2d3a49d..bd24f9c 100644 --- a/.github/workflows/build-and-publish.yml +++ b/.github/workflows/build-and-publish.yml | |||
@@ -2,19 +2,8 @@ name: Build and Publish Docker Image | |||
2 | 2 | ||
3 | on: | 3 | on: |
4 | push: | 4 | push: |
5 | branches: | ||
6 | - 'main' | ||
7 | paths-ignore: | ||
8 | - '**.md' | ||
9 | - '**.png' | ||
10 | tags: | 5 | tags: |
11 | - 'v*.*.*' | 6 | - 'v*.*.*' |
12 | pull_request: | ||
13 | branches: | ||
14 | - 'main' | ||
15 | paths-ignore: | ||
16 | - '**.md' | ||
17 | - '**.png' | ||
18 | release: | 7 | release: |
19 | types: [published] | 8 | types: [published] |
20 | workflow_dispatch: | 9 | workflow_dispatch: |
@@ -47,14 +36,12 @@ jobs: | |||
47 | uses: docker/setup-buildx-action@v1 | 36 | uses: docker/setup-buildx-action@v1 |
48 | 37 | ||
49 | - name: Login to DockerHub | 38 | - name: Login to DockerHub |
50 | if: ${{ github.event_name != 'pull_request' && github.ref == 'refs/heads/main' }} | ||
51 | uses: docker/login-action@v1 | 39 | uses: docker/login-action@v1 |
52 | with: | 40 | with: |
53 | username: ${{ secrets.DOCKERHUB_USERNAME }} | 41 | username: ${{ secrets.DOCKERHUB_USERNAME }} |
54 | password: ${{ secrets.DOCKERHUB_TOKEN }} | 42 | password: ${{ secrets.DOCKERHUB_TOKEN }} |
55 | 43 | ||
56 | - name: Login to GitHub Container Registry | 44 | - name: Login to GitHub Container Registry |
57 | if: ${{ github.event_name != 'pull_request' && github.ref == 'refs/heads/main' }} | ||
58 | uses: docker/login-action@v1 | 45 | uses: docker/login-action@v1 |
59 | with: | 46 | with: |
60 | registry: ghcr.io | 47 | registry: ghcr.io |
@@ -68,7 +55,7 @@ jobs: | |||
68 | context: . | 55 | context: . |
69 | file: ./Dockerfile | 56 | file: ./Dockerfile |
70 | platforms: linux/amd64,linux/arm64 | 57 | platforms: linux/amd64,linux/arm64 |
71 | push: ${{ github.event_name != 'pull_request' && github.ref == 'refs/heads/main' }} | 58 | push: true |
72 | tags: ${{ steps.meta.outputs.tags }}, getferdi/ferdi-server:latest | 59 | tags: ${{ steps.meta.outputs.tags }}, getferdi/ferdi-server:latest |
73 | labels: ${{ steps.meta.outputs.labels }} | 60 | labels: ${{ steps.meta.outputs.labels }} |
74 | 61 | ||