-
Notifications
You must be signed in to change notification settings - Fork 6
37 lines (27 loc) · 1.22 KB
/
docker-ubuntu1604.clang.ossfuzz.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
name: Docker Image [ubuntu1604.clang.ossfuzz]
on:
push:
tags:
- ubuntu1604.clang.ossfuzz-v*
jobs:
build:
env:
DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_DOCKER_REPOSITORY: docker.pkg.github.com/${{ github.repository }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Build image [ubuntu1604.clang.ossfuzz]
run: |
docker build ./docker --file docker/Dockerfile.ubuntu1604.clang.ossfuzz --tag ubuntu1604.clang.ossfuzz
- name: Push image [ubuntu1604.clang.ossfuzz]
run: |
# Strip git ref prefix from version
VERSION=$(echo "${{ github.ref }}" | sed -e 's,.*/\(.*\),\1,')
# Strip "v" prefix from tag name
[[ "${{ github.ref }}" == "refs/tags/"* ]] && VERSION=$(echo $VERSION | sed -e 's/^ubuntu1604.clang.ossfuzz-v//')-pre
echo ${GITHUB_TOKEN} | docker login docker.pkg.github.com -u ${GITHUB_ACTOR} --password-stdin
docker tag ubuntu1604.clang.ossfuzz $GITHUB_DOCKER_REPOSITORY/ubuntu1604.clang.ossfuzz:$VERSION
docker push $GITHUB_DOCKER_REPOSITORY/ubuntu1604.clang.ossfuzz:$VERSION
docker logout