forked from karmada-io/karmada
-
Notifications
You must be signed in to change notification settings - Fork 0
29 lines (28 loc) · 973 Bytes
/
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
name: Image
on:
push:
branches:
- master
jobs:
publish-image:
name: publish images
# prevent job running from forked repository, otherwise
# 1. running on the forked repository would fail as missing necessary secret.
# 2. running on the forked repository would use unnecessary GitHub Action time.
if: ${{ github.repository == 'karmada-io/karmada' && github.ref == 'refs/heads/master' }}
runs-on: ubuntu-18.04
steps:
- name: checkout code
uses: actions/checkout@v2
- name: install Go
uses: actions/setup-go@v2
with:
go-version: 1.16.x
- name: build images
env:
REGISTRY: ${{secrets.SWR_REGISTRY}}
REGISTRY_USER_NAME: ${{secrets.SWR_REGISTRY_USER_NAME}}
REGISTRY_PASSWORD: ${{secrets.SWR_REGISTRY_PASSWORD}}
REGISTRY_SERVER_ADDRESS: ${{secrets.SWR_REGISTRY_SERVER_ADDRESS}}
VERSION: latest
run: make upload-images