feat: update build #9
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Syft Task Build | ||
on: | ||
workflow_dispatch: | ||
push: | ||
branches: | ||
- main # Only run this workflow on pushes to the main branch | ||
jobs: | ||
build: | ||
# Check if the last commit is a merge from the `ui-changes` branch | ||
if: github.event_name != 'pull_request' && (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/dev') | ||
runs-on: ubuntu-latest | ||
environment: docker | ||
permissions: | ||
id-token: write | ||
contents: write | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
- name: GitHub Tag | ||
id: tag_version | ||
uses: mathieudutour/[email protected] | ||
with: | ||
github_token: ${{ secrets.GHCR_PAT }} | ||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v2 | ||
- name: Log in to the Container Registry | ||
uses: docker/login-action@65b78e6e13532edd9afa3aa52ac7964289d1a9c1 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GHCR_PAT }} | ||
- name: Build and Push Docker Image | ||
working-directory: sender | ||
uses: docker/build-push-action@v4 | ||
Check failure on line 43 in .github/workflows/go.yaml GitHub Actions / Syft Task BuildInvalid workflow file
|
||
with: | ||
context: . | ||
push: true | ||
platforms: linux/amd64,linux/arm64 | ||
tags: | | ||
ghcr.io/${{ github.repository_owner }}/og-task-syft:${{ steps.tag_version.outputs.new_tag }} | ||
file: ./Dockerfile | ||
cache-from: type=gha | ||
cache-to: type=gha,mode=max |