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,9 +103,13 @@ jobs:
103 103
         id: meta
104 104
         uses: docker/metadata-action@v5
105 105
         with:
106
-          images: nineseconds/mtg
106
+          images: |
107
+            nineseconds/mtg
108
+            ghcr.io/${{ github.repository }}
107 109
           tags: |
108 110
             type=semver,pattern={{version}}
111
+            type=semver,pattern={{major}}.{{minor}}
112
+            type=semver,pattern={{major}}
109 113
 
110 114
       - name: Setup QEMU
111 115
         uses: docker/setup-qemu-action@v3
@@ -128,6 +132,14 @@ jobs:
128 132
           username: ${{ secrets.DOCKERHUB_USERNAME }}
129 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 143
       - name: Build and push
132 144
         uses: docker/build-push-action@v2
133 145
         with:

Loading…
Annulla
Salva