Skip to content

[Snyk] Security upgrade alpine from 3.4 to 3.18.4 #141

[Snyk] Security upgrade alpine from 3.4 to 3.18.4

[Snyk] Security upgrade alpine from 3.4 to 3.18.4 #141

name: Build and Push OCI CLI Image
on:
push:
branches: [ "main" ]
paths:
- 'OracleCloudInfrastructuree/oci-cli/*'
- '.github/workflows/build-and-push-oci-cli-image.yml'
workflow_dispatch:
pull_request:
branches: [ "main" ]
env:
REGISTRY: ghcr.io
IMAGE_NAME: 'oracle/oci-cli'
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Setup Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Log into registry ${{ env.REGISTRY }}
if: github.event_name != 'pull_request'
uses: docker/login-action@v2
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract Docker metadata
id: meta
uses: docker/metadata-action@v4
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
- name: Build and push image
id: build-and-push
uses: docker/build-push-action@v3
with:
context: ./OracleCloudInfrastructure/oci-cli/
push: ${{ github.event_name != 'pull_request' }}
platforms: linux/amd64, linux/arm64
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}