-
Notifications
You must be signed in to change notification settings - Fork 92
45 lines (36 loc) · 1.13 KB
/
build-docker-image.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
name: Publish Docker image
on:
workflow_dispatch:
inputs:
docker_tag:
description: 'Docker tag'
required: true
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build_and_push:
name: Build and possibly Push Docker image to GitHub Packages
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Check out the repo
uses: actions/checkout@v3
- name: Set Docker tag
run: |
echo "::set-output name=tag::${{ github.event.inputs.docker_tag }}"
id: docker_tag
- name: Log in to GitHub Container Registry
uses: docker/[email protected]
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push Docker image
uses: docker/build-push-action@v4
with:
context: ./docker
push: ${{ startsWith(github.ref, 'refs/tags/') }}
tags: ghcr.io/${{ github.repository }}/manylinux2014_x86_64_opencv3:${{ steps.docker_tag.outputs.tag }}