Skip to content
This repository is currently being migrated. It's locked while the migration is in progress.

Commit

Permalink
Add docker release to pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
DavidMarchant committed Sep 15, 2022
1 parent be2ef44 commit 624e4f6
Showing 1 changed file with 31 additions and 2 deletions.
33 changes: 31 additions & 2 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand All @@ -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:
Expand All @@ -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

0 comments on commit 624e4f6

Please sign in to comment.