-
Notifications
You must be signed in to change notification settings - Fork 14
44 lines (37 loc) · 1.17 KB
/
Zipper_docker_build_push.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
name: Zipper Docker Image CI
on:
create:
push:
paths:
- 'Zipper/**'
- '.github/workflows/Zipper_docker_build_push.yml'
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Login to Docker Hub
uses: docker/[email protected]
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Extract branch name
if: startsWith(github.ref , 'refs/heads/')
shell: bash
run: echo "docker_tag=$(echo ${GITHUB_REF#refs/heads/})" >> $GITHUB_ENV
- name: Extract tag name
if: startsWith(github.ref , 'refs/tags/')
shell: bash
run: echo "docker_tag=$(echo ${GITHUB_REF#refs/tags/})" >> $GITHUB_ENV
- name: Build and push
uses: docker/[email protected]
with:
context: ./Zipper
file: Zipper/Dockerfile
platforms: linux/amd64
push: true
tags: osirixfoundation/kheops-zipper:${{ env.docker_tag }}