Skip to content

Commit

Permalink
allow additional tags when building image (#28)
Browse files Browse the repository at this point in the history
  • Loading branch information
arunpoudel authored Feb 7, 2024
1 parent d195277 commit 86d81a1
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion .github/workflows/oci-ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@ on:
type: string
default: ""
description: The path argument for the GitHub Actions function hashFiles.
tags:
type: string
default: ""
description: The tags (separated by space) to use for the image.
secrets:
REVIEWBOT_GITHUB_TOKEN:
required: true
Expand Down Expand Up @@ -80,7 +84,7 @@ jobs:
- name: Validate
run: docker compose run --rm ${{ inputs.docker-compose-service }} validate VERBOSE=all ENVIRONMENT=${{ inputs.environment }}
- name: Build
run: docker compose run --rm ${{ inputs.docker-compose-service }} build VERBOSE=all ENVIRONMENT=${{ inputs.environment }}
run: docker compose run --rm ${{ inputs.docker-compose-service }} build VERBOSE=all ENVIRONMENT=${{ inputs.environment }} oci_tag_suffixes_git="${{ inputs.tags }}"
- name: Autenticate with GCP
if: ${{ inputs.publish }}
uses: "google-github-actions/[email protected]"
Expand All @@ -91,6 +95,9 @@ jobs:
- name: Configure Google Cloud Artifact Registry for Docker
if: ${{ inputs.publish }}
run: gcloud auth print-access-token | docker login https://${{ inputs.artifact_registry_location }}-docker.pkg.dev -u oauth2accesstoken --password-stdin
- name: Publish with Tag
if: ${{ inputs.publish && inputs.tags != ''}}
run: docker compose run --rm ${{ inputs.docker-compose-service }} publish VERBOSE=all ENVIRONMENT=${{ inputs.environment }} oci_tag_suffixes_git="${{ inputs.tags }}"
- name: Publish
if: ${{ inputs.publish }}
run: docker compose run --rm ${{ inputs.docker-compose-service }} publish VERBOSE=all ENVIRONMENT=${{ inputs.environment }}
Expand Down

0 comments on commit 86d81a1

Please sign in to comment.