-
Notifications
You must be signed in to change notification settings - Fork 0
41 lines (41 loc) · 1.46 KB
/
watcher-ci.yaml
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
name: GRW-CI
on:
push:
branches:
- main
- master
- dev
- stage
- rc
jobs:
build:
runs-on: ubuntu-20.04
steps:
- name: checkout
uses: actions/checkout@v2
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v1
- name: set-image-tag
id: tag
run: echo "::set-output name=image_tag::$(git rev-parse --short HEAD)"
- name: login
env:
DOCKERHUB_USER: ${{ secrets.DOCKERHUB_USER }}
DOCKERHUB_PASSWORD: ${{ secrets.DOCKERHUB_PASSWORD }}
run: |
docker login -u $DOCKERHUB_USER -p $DOCKERHUB_PASSWORD
- name: build-push-image
run: docker buildx build --platform linux/amd64,linux/arm64,linux/ppc64le,linux/s390x,linux/arm/v7 -t linkinghack/k8s-generic-watcher:${{ steps.tag.outputs.image_tag }} . --push
# - name: 'update latest tag'
# run: docker tag linkinghack/k8s-generic-watcher:${{ steps.tag.outputs.image_tag }} linkinghack/k8s-generic-watcher
# - name: push-image
# env:
# DOCKERHUB_USER: ${{ secrets.DOCKERHUB_USER }}
# DOCKERHUB_PASSWORD: ${{ secrets.DOCKERHUB_PASSWORD }}
# run: |
# docker login -u $DOCKERHUB_USER -p $DOCKERHUB_PASSWORD
# docker push linkinghack/k8s-generic-watcher:${{ steps.tag.outputs.image_tag }}
# docker push linkinghack/k8s-generic-watcher