Skip to content

Commit

Permalink
Fix the tag and promote jobs
Browse files Browse the repository at this point in the history
This commit should:

* Allow us to create any semver compatible tags, including tags like v1.0.0-rc
* Allow us to publish artifacts

Signed-off-by: Nic Cope <negz@rk0n.org>
  • Loading branch information
negz committed Oct 24, 2020
1 parent 119d692 commit 34c1d3a
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 20 deletions.
7 changes: 7 additions & 0 deletions .github/workflows/promote.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,13 @@ jobs:
- name: Fetch History
run: git fetch --prune --unshallow

- name: Login to Docker
uses: docker/login-action@v1
if: env.DOCKER_USR != ''
with:
username: ${{ secrets.DOCKER_USR }}
password: ${{ secrets.DOCKER_PSW }}

- name: Promote Artifacts in S3 and Docker Hub
if: env.AWS_USR != '' && env.DOCKER_USR != ''
run: make -j2 promote BRANCH_NAME=${GITHUB_REF##*/}
Expand Down
28 changes: 8 additions & 20 deletions .github/workflows/tag.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,9 @@ on:
version:
description: 'Release version (e.g. v0.1.0)'
required: true

env:
UPBOUND_BOT_USR: ${{ secrets.UPBOUND_BOT_USR }}
UPBOUND_BOT_PSW: ${{ secrets.UPBOUND_BOT_PSW }}
message:
description: 'Tag message'
required: true

jobs:
create-tag:
Expand All @@ -18,21 +17,10 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v2
with:
submodules: true

- name: Fetch History
run: git fetch --prune --unshallow

- name: Configure Git User
run: |
git config --global credential.helper cache
git config remote.origin.url https://${UPBOUND_BOT_USR}:${UPBOUND_BOT_PSW}@$(git config --get remote.origin.url | sed -e 's/https:\/\///')
git config user.name "upbound-bot"
git config user.email "info@crossplane.io"

- name: Create Tag
run: make -j2 tag
env:
VERSION: ${{ github.event.inputs.version }}

uses: negz/create-tag@v1
with:
version: ${{ github.event.inputs.version }}
message: ${{ github.event.inputs.message }}
token: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit 34c1d3a

Please sign in to comment.