build(deps): bump actions/checkout from 4.2.1 to 4.2.2 #2135
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
#********************************************************************* | |
# Copyright (c) Intel Corporation 2021 | |
# SPDX-License-Identifier: Apache-2.0 | |
#*********************************************************************/ | |
name: Docker Image CI | |
on: | |
push: | |
branches: [ main ] | |
tags: | |
- '*' | |
pull_request: | |
branches: [ main ] | |
permissions: | |
contents: read | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Harden Runner | |
uses: step-security/harden-runner@91182cccc01eb5e619899d80e4e971d6181294a7 # v2.10.1 | |
with: | |
egress-policy: audit | |
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
- name: Build the Docker image | |
run: docker build -f "Dockerfile" --tag vprodemo.azurecr.io/rpc-go:${{ github.sha }} --tag vprodemo.azurecr.io/rpc-go:latest . | |
- name: Docker Login | |
if: ${{ github.ref == 'refs/heads/main' }} | |
uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 # v3.3.0 | |
with: | |
registry: vprodemo.azurecr.io | |
username: ${{ secrets.DOCKER_USERNAME }} | |
password: ${{ secrets.DOCKER_PASSWORD }} | |
logout: true | |
- name: Push the Docker image to the registry | |
if: ${{ github.ref == 'refs/heads/main' }} | |
run: docker push vprodemo.azurecr.io/rpc-go:${{ github.sha }} | |
- name: Push the Docker image to the registry | |
if: ${{ github.ref == 'refs/heads/main' }} | |
run: docker push vprodemo.azurecr.io/rpc-go:latest | |
- name: Push the Docker image to the registry | |
if: startsWith(github.ref, 'refs/tags/v') | |
run: docker image tag vprodemo.azurecr.io/rpc-go:${GITHUB_REF#refs/tags/} && docker push vprodemo.azurecr.io/rpc-go:${GITHUB_REF#refs/tags/} |