mirror of
https://github.com/puppetlabs/infinitory.git
synced 2026-01-25 18:08:40 -05:00
(DIO-1541) Release with github actions
This commit is contained in:
parent
39cadfd3a6
commit
fff88bcff7
3 changed files with 53 additions and 3 deletions
47
.github/release.yml
vendored
Normal file
47
.github/release.yml
vendored
Normal file
|
|
@ -0,0 +1,47 @@
|
||||||
|
name: Publish App
|
||||||
|
|
||||||
|
on: workflow_dispatch
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
publish-app:
|
||||||
|
name: Tag Release and Publish to GCR
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Check out code
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
with:
|
||||||
|
ref: ${{ github.ref }}
|
||||||
|
clean: true
|
||||||
|
fetch-depth: 0
|
||||||
|
|
||||||
|
- name: Get Version
|
||||||
|
id: get_version
|
||||||
|
run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\//}
|
||||||
|
|
||||||
|
- name: 'Authenticate to Google Cloud'
|
||||||
|
id: 'auth'
|
||||||
|
uses: 'google-github-actions/auth@v0.3.0'
|
||||||
|
with:
|
||||||
|
create_credentials_file: true
|
||||||
|
workload_identity_provider: 'projects/654128975483/locations/global/workloadIdentityPools/gh-action-pool'
|
||||||
|
service_account: 'gcr-gh-action@infracore.iam.gserviceaccount.com'
|
||||||
|
|
||||||
|
- name: Build & push Docker image - flask
|
||||||
|
uses: mr-smithers-excellent/docker-build-push@v5
|
||||||
|
with:
|
||||||
|
image: infracore/infinitory-flask
|
||||||
|
tags: ${{ steps.get_version.outputs.VERSION }}
|
||||||
|
registry: gcr.io
|
||||||
|
dockerfile: infinitory-flask/Dockerfile
|
||||||
|
username: _json_key
|
||||||
|
password: ${{ steps.auth.outputs.credentials_file_path }}
|
||||||
|
|
||||||
|
- name: Build & push Docker image - cron
|
||||||
|
uses: mr-smithers-excellent/docker-build-push@v5
|
||||||
|
with:
|
||||||
|
image: infracore/infinitory-cron
|
||||||
|
tags: ${{ steps.get_version.outputs.VERSION }}
|
||||||
|
registry: gcr.io
|
||||||
|
dockerfile: Dockerfile
|
||||||
|
username: _json_key
|
||||||
|
password: ${{ steps.auth.outputs.credentials_file_path }}
|
||||||
|
|
@ -1,8 +1,11 @@
|
||||||
FROM python:3.10-rc-buster
|
FROM python:3.10-rc-buster
|
||||||
|
ADD README.md /
|
||||||
ADD generate.py /
|
ADD generate.py /
|
||||||
|
ADD setup.py /
|
||||||
|
ADD infinitory /infinitory
|
||||||
ENV TOKEN $TOKEN
|
ENV TOKEN $TOKEN
|
||||||
ENV BUCKET $BUCKET
|
ENV BUCKET $BUCKET
|
||||||
ENV GOOGLE_APPLICATION_CREDENTIALS $GOOGLE_APPLICATION_CREDENTIALS
|
ENV GOOGLE_APPLICATION_CREDENTIALS $GOOGLE_APPLICATION_CREDENTIALS
|
||||||
RUN pip install --upgrade pip
|
RUN pip install --upgrade pip
|
||||||
RUN pip install -i https://artifactory.delivery.puppetlabs.net/artifactory/api/pypi/pypi/simple -v infinitory==0.1.6
|
RUN python setup.py install
|
||||||
ENTRYPOINT python generate.py ${PDB_HOST} ${TOKEN} ${BUCKET}
|
ENTRYPOINT python generate.py ${PDB_HOST} ${TOKEN} ${BUCKET}
|
||||||
2
setup.py
2
setup.py
|
|
@ -8,7 +8,7 @@ setuptools.setup(
|
||||||
author = "Daniel Parks",
|
author = "Daniel Parks",
|
||||||
author_email = "daniel.parks@puppet.com",
|
author_email = "daniel.parks@puppet.com",
|
||||||
url = "http://github.com/puppetlabs/infinitory",
|
url = "http://github.com/puppetlabs/infinitory",
|
||||||
long_description = open("README.rst").read(),
|
long_description = open("README.md").read(),
|
||||||
|
|
||||||
classifiers = [
|
classifiers = [
|
||||||
"Development Status :: 3 - Alpha",
|
"Development Status :: 3 - Alpha",
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue