-
Notifications
You must be signed in to change notification settings - Fork 17
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
f1ccffd
commit 79bac57
Showing
2 changed files
with
38 additions
and
0 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,35 @@ | ||
name: package | ||
on: | ||
release: | ||
types: [created] | ||
push: | ||
branches: | ||
- issue-160 | ||
|
||
jobs: | ||
|
||
version: | ||
runs-on: ubuntu-latest | ||
outputs: | ||
app-version: ${{ steps.set-version.outputs.version }} | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- run: echo "APP_VERSION=$(python setup.py --version)" >> $GITHUB_ENV | ||
- run: echo app version is $APP_VERSION | ||
- id: set-version | ||
run: echo "::set-output name=version::$APP_VERSION" | ||
|
||
container-build: | ||
needs: version | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- run: echo version ${{needs.version.outputs.app-version}} | ||
- run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin | ||
- name: build & push image | ||
run: | | ||
IMAGE_ID=ghcr.io/duke-gcb/calrissian/calrissian | ||
docker build . --file Dockerfile --tag calrissian | ||
docker tag calrissian $IMAGE_ID:${{needs.version.outputs.app-version}} | ||
docker push $IMAGE_ID:${{needs.version.outputs.app-version}} | ||