This repository is currently being migrated. It's locked while the migration is in progress.
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
be2ef44
commit 624e4f6
Showing
1 changed file
with
31 additions
and
2 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,9 +6,21 @@ on: | |
- 'v*' | ||
|
||
jobs: | ||
runs-on: ubuntu-latest | ||
name: Set up environment | ||
steps: | ||
- name: Set Version Environment Variables | ||
run: | | ||
echo "VERSION_TAG=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV | ||
# Remove leading v | ||
# Do parameter expansion outside of assignment | ||
version_tag=${{ env.VERSION }} | ||
semvar=${version_tag#v} | ||
echo "SEMANTIC_VERSION=$semvar" >> $GITHUB_ENV | ||
publish-binaries: | ||
runs-on: ubuntu-latest | ||
name: Publish release binaries | ||
name: Publish release binaries to GitHub | ||
steps: | ||
- name: Cancel Previous Runs | ||
uses: styfle/[email protected] | ||
|
@@ -19,7 +31,7 @@ jobs: | |
- name: Run tests | ||
run: make test-docker | ||
- name: Build binaries | ||
run: SEMANTIC_VERSION=${GITHUB_REF#refs/*/} make release-docker | ||
run: SEMANTIC_VERSION=${{ env.SEMANTIC_VERSION }} make release-docker | ||
- name: Create release | ||
uses: softprops/action-gh-release@v1 | ||
with: | ||
|
@@ -31,3 +43,20 @@ jobs: | |
./bin/release/storageos_linux_amd64.sha256 | ||
./bin/release/storageos_windows_amd64 | ||
./bin/release/storageos_windows_amd64.sha256 | ||
dockerhub-release: | ||
runs-on: ubuntu-18.04 | ||
name: Publish container to Dockerhub | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
- name: Login to container registry | ||
uses: docker/login-action@v1 | ||
with: | ||
registry: docker.io | ||
username: ${{ secrets.DOCKERHUB_CLI_USERNAME }} | ||
password: ${{ secrets.DOCKERHUB_CLI_PASSWORD }} | ||
- name: Build image | ||
run: SEMANTIC_VERSION=${{ env.SEMANTIC_VERSION }} make build-cli-image | ||
- name: Push image | ||
run: SEMANTIC_VERSION=${{ env.SEMANTIC_VERSION }} make push-cli-image |