Skip to content

Commit

Permalink
chore: add grc workflow (#18)
Browse files Browse the repository at this point in the history
  • Loading branch information
jairoFernandez authored Jun 13, 2024
1 parent d221146 commit 6fdbe97
Showing 1 changed file with 49 additions and 0 deletions.
49 changes: 49 additions & 0 deletions .github/workflows/publish_grc.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: Publish image to GitHub GRC

on:
workflow_dispatch:
inputs:
image-folder:
description: 'The folder that contains the Dockerfile to build'
required: true
image-tag:
description: 'The image tag to build'
required: true

jobs:
publish_to_public_grc:
runs-on: ubuntu-latest

steps:
- name: Build info
run: |
echo "image folder ${{ github.event.inputs.image-folder }}"
echo "image tag ${{ github.event.inputs.image-tag }}"
- name: Checkout repository
uses: actions/checkout@v4

- name: Log in to GitHub Container Registry
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Login to Amazon ECR Public
id: login-ecr-public
uses: aws-actions/amazon-ecr-login@v2
with:
registry-type: public

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
with:
platforms: linux/amd64,linux/arm64

- name: Build and push
uses: docker/build-push-action@v5
with:
context: "${{ github.event.inputs.image-folder }}"
push: true
tags: ghcr.io/${{ github.repository_owner }}/${{ github.event.inputs.image-folder }}:${{ github.event.inputs.image-tag }}

0 comments on commit 6fdbe97

Please sign in to comment.