generated from crossplane-contrib/provider-jet-template
-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat(ci): added contrib stuff Signed-off-by: haarchri <chhaar30@googlemail.com>
- Loading branch information
Showing
3 changed files
with
88 additions
and
18 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
name: Promote | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
version: | ||
description: 'Release version (e.g. v0.1.0)' | ||
required: true | ||
channel: | ||
description: 'Release channel' | ||
required: true | ||
default: 'alpha' | ||
|
||
env: | ||
# Common users. We can't run a step 'if secrets.AWS_USR != ""' but we can run | ||
# a step 'if env.AWS_USR' != ""', so we copy these to succinctly test whether | ||
# credentials have been provided before trying to run steps that need them. | ||
CONTRIB_DOCKER_USR: ${{ secrets.CONTRIB_DOCKER_USR }} | ||
AWS_USR: ${{ secrets.AWS_USR }} | ||
|
||
jobs: | ||
promote-artifacts: | ||
runs-on: ubuntu-22.04 | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
with: | ||
submodules: true | ||
|
||
- name: Fetch History | ||
run: git fetch --prune --unshallow | ||
|
||
- name: Login to Docker | ||
uses: docker/login-action@v1 | ||
if: env.CONTRIB_DOCKER_USR != '' | ||
with: | ||
username: ${{ secrets.CONTRIB_DOCKER_USR }} | ||
password: ${{ secrets.CONTRIB_DOCKER_PSW }} | ||
|
||
- name: Promote Artifacts in S3 and Docker Hub | ||
if: env.AWS_USR != '' && env.CONTRIB_DOCKER_USR != '' | ||
run: make -j2 promote BRANCH_NAME=${GITHUB_REF##*/} | ||
env: | ||
VERSION: ${{ github.event.inputs.version }} | ||
CHANNEL: ${{ github.event.inputs.channel }} | ||
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_USR }} | ||
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_PSW }} |
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