Skip to content

Merge pull request #8 from instriq/develop #39

Merge pull request #8 from instriq/develop

Merge pull request #8 from instriq/develop #39

Workflow file for this run

name: Deploy to GitHub Container Registry
on:
push:
branches:
- main
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build Docker image
id: build
run: |
COMMIT_SHA=$(echo "${GITHUB_SHA}" | cut -c1-7)
docker build --file Dockerfile --tag ${{ github.repository }}:latest --tag ${{ github.repository }}:${COMMIT_SHA} .
echo "COMMIT_SHA=${COMMIT_SHA}" >> $GITHUB_ENV
- name: Log in to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.LESIS_DEPLOY }}
- name: Push Docker image to GitHub Container Registry
run: |
docker push ghcr.io/${{ github.repository }}/security-gate:latest
docker push ghcr.io/${{ github.repository }}/security-gate:${{ env.COMMIT_SHA }}