-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #24 from sdodsley/master
Create release workflow
- Loading branch information
Showing
2 changed files
with
57 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
name: Release | ||
|
||
"on": | ||
release: | ||
types: | ||
- created | ||
|
||
jobs: | ||
release: | ||
runs-on: ubuntu-latest | ||
name: Release | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- uses: actions/setup-python@v2 | ||
with: | ||
python-version: "3.11" | ||
|
||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install tox | ||
- name: Build image | ||
env: | ||
DOCKER_BUILDKIT: 1 | ||
run: | | ||
tox -e podman -- ${{ github.event.release.tag_name }} | ||
- name: Push swagger | ||
uses: redhat-actions/[email protected] | ||
with: | ||
image: swagger | ||
tags: ${{ github.event.release.tag_name }} latest | ||
registry: quay.io/purestorage/ | ||
username: ${{ secrets.QUAY_USERNAME }} | ||
password: ${{ secrets.QUAY_TOKEN }} |
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,20 @@ | ||
[tox] | ||
minversion = 1.6 | ||
skipsdist = True | ||
|
||
[testenv] | ||
basepython = python3 | ||
#install_command = pip install {opts} {packages} | ||
#deps = -r{toxinidir}/requirements.txt | ||
|
||
[testenv:podman] | ||
passenv = | ||
HOME | ||
whitelist_external = | ||
true | ||
commands = | ||
/bin/bash -c "podman rmi quay.io/purestorage/swagger:latest || true" | ||
docker build . -t swagger:{posargs} -t swagger:latest | ||
allowlist_externals = | ||
/bin/bash | ||
docker |