Skip to content

Commit 1d65bfc

Browse files
authored
Update publish-ghcr.yml
1 parent bba9b5d commit 1d65bfc

File tree

1 file changed

+20
-42
lines changed

1 file changed

+20
-42
lines changed

.github/workflows/publish-ghcr.yml

Lines changed: 20 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -7,49 +7,27 @@ env:
77
REGISTRY: ghcr.io
88
IMAGE_NAME: ${{ github.repository }}
99

10+
1011
jobs:
1112
build:
1213
runs-on: ubuntu-latest
13-
14-
# Permissões necessárias para o GITHUB_TOKEN
15-
permissions:
16-
contents: read
17-
packages: write
18-
14+
1915
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

Comments
 (0)