Skip to content

Update Dockerfile

Update Dockerfile #4

name: Build Nextcloud
on:
pull_request:
branches:
- production #replace with target branch
types:
- closed
jobs:
if_merged:
if: github.event.pull_request.merged == true
name: Build Nextcloud & Push
runs-on: ubuntu-latest
defaults:
run:
working-directory: .
steps:
- name: Checkout Code
uses: actions/checkout@v4
with:
ref: ${{ github.ref_name }}
fetch-depth: 3
- name: Log in to GHCR
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v5
with:
images: ghcr.io/${{ github.repository }}
tags: |
type=raw,value=latest
type=raw,value=32
type=raw,value=build-${{ github.run_number }}
- name: Build and push Docker image
uses: docker/build-push-action@v5
with:
file: Dockerfile
context: .
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
# "PORT=${{ secrets.SV_PORT }}"
# "CAPTCHAKEY=${{ secrets.CAPTCHAKEY }}"
# "PB_URL=${{ secrets.PB_URL }}"