mirror of
https://github.com/puppetlabs/infinitory.git
synced 2026-01-25 18:08:40 -05:00
57 lines
No EOL
1.7 KiB
YAML
57 lines
No EOL
1.7 KiB
YAML
name: Publish App
|
|
|
|
on:
|
|
push:
|
|
tags:
|
|
- 'v*'
|
|
|
|
jobs:
|
|
publish-app:
|
|
name: Publish tagged release to GCR
|
|
runs-on: ubuntu-latest
|
|
|
|
permissions:
|
|
contents: 'read'
|
|
id-token: 'write'
|
|
|
|
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##*/}
|
|
|
|
- name: 'Authenticate to Google Cloud'
|
|
id: 'auth'
|
|
uses: 'google-github-actions/auth@v0.3.1'
|
|
with:
|
|
token_format: 'access_token'
|
|
access_token_lifetime: '600s'
|
|
workload_identity_provider: 'projects/654128975483/locations/global/workloadIdentityPools/gh-action-pool/providers/github-action-provider'
|
|
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
|
|
directory: infinitory-flask
|
|
dockerfile: infinitory-flask/Dockerfile
|
|
username: oauth2accesstoken
|
|
password: ${{ steps.auth.outputs.access_token }}
|
|
|
|
- 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: oauth2accesstoken
|
|
password: ${{ steps.auth.outputs.access_token }} |