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

34 lines
931 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
2022-06-05 10:33:24 +00:00
uses: docker/login-action@v2.0.0
2022-06-05 10:31:28 +00:00
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKER_TOKEN }}
- name: Build image and push to Docker Hub and GitHub Container Registry
2022-06-05 10:33:24 +00:00
uses: docker/build-push-action@v3.0.0
2022-06-05 10:31:28 +00:00
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' }}