onlyoffice-ce-docker-license/.github/workflows/docker-image.yml

34 lines
923 B
YAML
Raw Normal View History

2021-04-26 09:34:06 +00:00
name: Docker Image CI
on:
push:
2022-06-05 10:31:28 +00:00
branches: [ "main" ]
pull_request:
branches: [ "main" ]
2021-04-26 09:34:06 +00:00
jobs:
build:
runs-on: ubuntu-latest
steps:
2022-06-05 10:31:28 +00:00
- uses: actions/checkout@v3
- name: Build the Docker image
run: docker build . --file Dockerfile --tag xbeeant/oo-unlimit:$(date +%s)
- name: Login to DockerHub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKER_TOKEN }}
- name: Build image and push to Docker Hub and GitHub Container Registry
uses: docker/build-push-action@v2
with:
# relative path to the place where source code with Dockerfile is located
context: ./
# Note: tags has to be all lower-case
tags: |
xbeeant/devdocs:latest
# build on feature branches, push only on main branch
push: ${{ github.ref == 'refs/heads/main' }}