Skip to content

Initial Commit

Initial Commit #1

Workflow file for this run

on:
push:
branches: [ "main" ]
paths:
- 'Adastral.Cockatoo.WebApi/**/*'
- 'Adastral.Cockatoo.Services.WebApi/**/*'
- 'Adastral.Cockatoo.Services.WebApi.Models/**/*'
- 'Adastral.Cockatoo.Common/**/*'
- 'Adastral.Cockatoo.DataAccess/**/*'
- 'Adastral.Cockatoo.Services/**/*'
- 'Dockerfile'
- '*/Dockerfile'
- '.github/workflows/docker.yml'
jobs:
build_dev:
strategy:
matrix:
cockatoo:
- containerName: 'cockatoo-webapi'
dockerfileLocation: Dockerfile
dockerfileContext: .
tag: 'latest'
runs-on: ubuntu-latest
permissions:
contents: 'read'
id-token: 'write'
steps:
- uses: 'actions/checkout@v4'
- id: 'auth'
uses: 'google-github-actions/auth@v2'
with:
credentials_json: '${{ secrets.GCP_CREDENTIALS }}'
- name: 'Set up Cloud SDK'
uses: 'google-github-actions/setup-gcloud@v2'
with:
version: '>= 363.0.0'
- name: 'Setup Artifact Registry'
shell: bash
run: gcloud auth configure-docker australia-southeast1-docker.pkg.dev
- name: 'Build Container'
shell: bash
run: docker build -t ${{ matrix.cockatoo.containerName }} -f ${{ matrix.cockatoo.dockerfileLocation }} .
- name: 'Push Container'
shell: bash
run: |
docker tag ${{ matrix.cockatoo.containerName }}:latest australia-southeast1-docker.pkg.dev/redfur/adastral/${{ matrix.cockatoo.containerName }}:${{ matrix.cockatoo.tag }}
docker push australia-southeast1-docker.pkg.dev/redfur/adastral/${{ matrix.cockatoo.containerName }}:${{ matrix.cockatoo.tag }}