|
7 | 7 | REGISTRY: ghcr.io |
8 | 8 | IMAGE_NAME: ${{ github.repository }} |
9 | 9 |
|
| 10 | + |
10 | 11 | jobs: |
11 | 12 | build: |
12 | 13 | runs-on: ubuntu-latest |
13 | | - |
14 | | - # Permissões necessárias para o GITHUB_TOKEN |
15 | | - permissions: |
16 | | - contents: read |
17 | | - packages: write |
18 | | - |
| 14 | + |
19 | 15 | steps: |
20 | | - - name: Checkout repository |
21 | | - uses: actions/checkout@v4 |
22 | | - |
23 | | - - name: Set up Docker Buildx |
24 | | - uses: docker/setup-buildx-action@v3 |
25 | | - |
26 | | - - name: Log in to Container Registry |
27 | | - uses: docker/login-action@v3 |
28 | | - with: |
29 | | - registry: ${{ env.REGISTRY }} |
30 | | - username: ${{ github.actor }} |
31 | | - password: ${{ secrets.GITHUB_TOKEN }} |
32 | | - |
33 | | - - name: Extract metadata |
34 | | - id: meta |
35 | | - uses: docker/metadata-action@v5 |
36 | | - with: |
37 | | - images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} |
38 | | - tags: | |
39 | | - type=ref,event=branch |
40 | | - type=ref,event=pr |
41 | | - type=sha,prefix={{branch}}- |
42 | | - type=raw,value=latest,enable={{is_default_branch}} |
43 | | - type=semver,pattern={{version}} |
44 | | - type=semver,pattern={{major}}.{{minor}} |
45 | | - |
46 | | - - name: Build and push Docker image |
47 | | - uses: docker/build-push-action@v6 |
48 | | - with: |
49 | | - context: . |
50 | | - platforms: linux/amd64 |
51 | | - push: true |
52 | | - tags: ${{ steps.meta.outputs.tags }} |
53 | | - labels: ${{ steps.meta.outputs.labels }} |
54 | | - cache-from: type=gha |
55 | | - cache-to: type=gha,mode=max |
| 16 | + - name: Checkout code |
| 17 | + uses: actions/checkout@v4 |
| 18 | + |
| 19 | + - name: Log in to GitHub Container Registry |
| 20 | + run: echo ${{ secrets.GITHUB_TOKEN }} | docker login ghcr.io -u ${{ github.actor }} --password-stdin |
| 21 | + |
| 22 | + - name: Build Docker APP image |
| 23 | + run: docker build -t ghcr.io/librecodecoop/nextcloud-app:31-fpm-latest -f .docker/app/Dockerfile . |
| 24 | + |
| 25 | + - name: Build Docker WEB image |
| 26 | + run: docker build -t ghcr.io/librecodecoop/nextcloud-web:31-fpm-latest -f .docker/web/Dockerfile . |
| 27 | + |
| 28 | + |
| 29 | + - name: Push Docker APP image |
| 30 | + run: docker push ghcr.io/librecodecoop/nextcloud-app:31-fpm-latest |
| 31 | + |
| 32 | + - name: Push Docker WEB image |
| 33 | + run: docker push ghcr.io/librecodecoop/nextcloud-web:31-fpm-latest |
0 commit comments