chore(deps): update registry.k8s.io/git-sync/git-sync docker tag to v4.3.0 #146
Workflow file for this run
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: Image | |
on: | |
push: | |
branches: | |
- main | |
paths: | |
- Dockerfile | |
- docker-entrypoint.sh | |
- .github/workflows/image.yml | |
pull_request: | |
branches: | |
- main | |
jobs: | |
build: | |
name: Build | |
runs-on: ubuntu-latest | |
env: | |
PLATFORMS: linux/amd64,linux/arm/v7,linux/arm64 | |
steps: | |
# checkout | |
- uses: actions/checkout@v4 | |
# setup qemu | |
- uses: docker/setup-qemu-action@v3 | |
with: | |
platforms: all | |
# setup docker metadata | |
- uses: docker/metadata-action@v5 | |
id: metadata | |
with: | |
images: | | |
ghcr.io/${{ github.repository }} | |
tags: | | |
type=ref,event=branch | |
type=ref,event=pr | |
# setup docker buildx | |
- uses: docker/setup-buildx-action@v3 | |
id: buildx | |
with: | |
version: latest | |
install: true | |
# login to github container registry | |
- uses: docker/login-action@v3 | |
if: github.event_name != 'pull_request' | |
with: | |
registry: ghcr.io | |
username: ${{ github.repository_owner }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
# build & push image | |
- uses: docker/build-push-action@v6 | |
id: build | |
with: | |
builder: ${{ steps.buildx.outputs.name }} | |
platforms: ${{ env.PLATFORMS }} | |
push: ${{ github.event_name != 'pull_request' }} | |
tags: ${{ steps.metadata.outputs.tags }} | |
labels: ${{ steps.metadata.outputs.labels }} | |
cache-from: type=gha | |
cache-to: type=gha,mode=max | |
build-args: | | |
SYNC_REPO=https://github.com/${{ github.repository }} | |
SYNC_BRANCH=${{ github.ref_name }} | |
# output image digest | |
- name: Output image digest | |
run: | | |
echo ${{ steps.build.outputs.digest }} | |
scan: | |
name: Scan | |
runs-on: ubuntu-latest | |
steps: | |
# login to docker hub | |
- uses: docker/login-action@v3 | |
if: github.event_name != 'pull_request' | |
with: | |
registry: ghcr.io | |
username: ${{ github.repository_owner }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
# scan image | |
- uses: crazy-max/ghaction-container-scan@v3 | |
if: github.event_name != 'pull_request' | |
id: scan | |
with: | |
image: ghcr.io/${{ github.repository }}:main | |
annotations: true |