diff --git a/.github/workflows/release.yml b/.github/release.yml similarity index 62% rename from .github/workflows/release.yml rename to .github/release.yml index 361af94..6944a68 100644 --- a/.github/workflows/release.yml +++ b/.github/release.yml @@ -1,19 +1,11 @@ name: Publish App -on: - push: - tags: - - 'v*' +on: workflow_dispatch jobs: publish-app: - name: Publish tagged release to GCR + name: Tag Release and Publish to GCR runs-on: ubuntu-latest - - permissions: - contents: 'read' - id-token: 'write' - steps: - name: Check out code uses: actions/checkout@v2 @@ -24,15 +16,14 @@ jobs: - name: Get Version id: get_version - run: echo ::set-output name=VERSION::${GITHUB_REF##*/} + run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\//} - name: 'Authenticate to Google Cloud' id: 'auth' - uses: 'google-github-actions/auth@v0.3.1' + uses: 'google-github-actions/auth@v0.3.0' with: - token_format: 'access_token' - access_token_lifetime: '600s' - workload_identity_provider: 'projects/654128975483/locations/global/workloadIdentityPools/gh-action-pool/providers/github-action-provider' + 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 @@ -41,10 +32,9 @@ jobs: image: infracore/infinitory-flask tags: ${{ steps.get_version.outputs.VERSION }} registry: gcr.io - directory: infinitory-flask dockerfile: infinitory-flask/Dockerfile - username: oauth2accesstoken - password: ${{ steps.auth.outputs.access_token }} + username: _json_key + password: ${{ steps.auth.outputs.credentials_file_path }} - name: Build & push Docker image - cron uses: mr-smithers-excellent/docker-build-push@v5 @@ -53,5 +43,5 @@ jobs: tags: ${{ steps.get_version.outputs.VERSION }} registry: gcr.io dockerfile: Dockerfile - username: oauth2accesstoken - password: ${{ steps.auth.outputs.access_token }} \ No newline at end of file + username: _json_key + password: ${{ steps.auth.outputs.credentials_file_path }} \ No newline at end of file diff --git a/CODEOWNERS b/CODEOWNERS index f5884a2..d17407c 100644 --- a/CODEOWNERS +++ b/CODEOWNERS @@ -1,8 +1,8 @@ -# This will cause IT SysOps to be assigned review of any opened PRs against +# This will cause InfraCore to be assigned review of any opened PRs against # the branches containing this file. # See https://help.github.com/en/articles/about-code-owners for info on how to # take ownership of parts of the code base that should be reviewed by another # team. -* @puppetlabs/it-ops +* @puppetlabs/dio diff --git a/README.md b/README.md index 0c3b24a..1024f4c 100644 --- a/README.md +++ b/README.md @@ -63,9 +63,3 @@ python setup.py sdist upload -r local ``` `infinitory-flask` - Simply build and push the docker image to release this portion of the app. - -Before a release, the `requirements.txt` file should be regenerated: -``` -pip install pipreqs #if needed -pipreqs . -``` diff --git a/requirements.txt b/requirements.txt deleted file mode 100644 index 1cd49ce..0000000 --- a/requirements.txt +++ /dev/null @@ -1,13 +0,0 @@ -click==8.0.3 -colorlog==6.6.0 -Flask==2.0.2 -Jinja2==3.0.3 -markdown2==2.4.2 -paramiko==2.9.2 -protobuf==3.19.4 -Pygments==2.11.2 -pypuppetdb==2.5.1 -requests==2.25.1 -sample==1.0.0 -setuptools==52.0.0 -simplepup==0.0.4