Sfoglia il codice sorgente

Correctly build and push images into registry

tags/v2.1.9^2
Sergey Arkhipov 2 mesi fa
parent
commit
c7ab53134a
1 ha cambiato i file con 13 aggiunte e 1 eliminazioni
  1. 13
    1
      .github/workflows/ci.yaml

+ 13
- 1
.github/workflows/ci.yaml Vedi File

103
         id: meta
103
         id: meta
104
         uses: docker/metadata-action@v5
104
         uses: docker/metadata-action@v5
105
         with:
105
         with:
106
-          images: nineseconds/mtg
106
+          images: |
107
+            nineseconds/mtg
108
+            ghcr.io/${{ github.repository }}
107
           tags: |
109
           tags: |
108
             type=semver,pattern={{version}}
110
             type=semver,pattern={{version}}
111
+            type=semver,pattern={{major}}.{{minor}}
112
+            type=semver,pattern={{major}}
109
 
113
 
110
       - name: Setup QEMU
114
       - name: Setup QEMU
111
         uses: docker/setup-qemu-action@v3
115
         uses: docker/setup-qemu-action@v3
128
           username: ${{ secrets.DOCKERHUB_USERNAME }}
132
           username: ${{ secrets.DOCKERHUB_USERNAME }}
129
           password: ${{ secrets.DOCKERHUB_PASSWORD }}
133
           password: ${{ secrets.DOCKERHUB_PASSWORD }}
130
 
134
 
135
+      - name: Login to GitHub Container Registry
136
+        if: github.event_name != 'pull_request'
137
+        uses: docker/login-action@v3
138
+        with:
139
+          registry: ghcr.io
140
+          username: ${{ github.actor }}
141
+          password: ${{ secrets.GH_PATH }}
142
+
131
       - name: Build and push
143
       - name: Build and push
132
         uses: docker/build-push-action@v2
144
         uses: docker/build-push-action@v2
133
         with:
145
         with:

Loading…
Annulla
Salva