released image to SWR #42
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: released image to SWR | |
on: | |
release: | |
types: | |
- published | |
jobs: | |
release-image: | |
name: release 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 == 'kubernetes-sigs/cloud-provider-huaweicloud' }} | |
runs-on: ubuntu-latest | |
steps: | |
- name: checkout code | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: install Go | |
uses: actions/setup-go@v3 | |
with: | |
go-version: 1.19.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: ${{ github.ref_name }} | |
run: make upload-images |