Skip to content

Update README.md

Update README.md #30

name: DiploiTemplateBuild
on:
push:
branches:
- main
tags:
- 'v*'
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Docker meta
id: meta
uses: docker/metadata-action@v4
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
#images: repository.vp.diploi.dev/${{ env.IMAGE_NAME }}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
#- name: Log in to the Diploi container registry
# uses: docker/login-action@v2
# with:
# registry: repository.vp.diploi.dev
# #username: ${{ github.actor }}
# username: ${{ secrets.REPOTEST_USER }}
# #password: ${{ secrets.GITHUB_TOKEN }}
# password: ${{ secrets.REPOTEST_SECRET }}
#- name: Login to DockerHub
# uses: docker/login-action@v1
# with:
# username: ${{ secrets.DOCKER_USERNAME }}
# password: ${{ secrets.DOCKER_PASSWORD }}
- name: Log in to the GitHub container registry
uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v3
with:
context: .
pull: true
push: ${{ github.event_name != 'pull_request' }}
#cache-from: type=registry,ref=nemesys/diploi-tiny-template:latest
#cache-to: type=inline
file: DockerfileBase
#tags: nemesys/diploi-nextjs-strapi-template:latest
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}