Skip to content

build(deps): bump ossf/scorecard-action from 2.3.1 to 2.3.3 #352

build(deps): bump ossf/scorecard-action from 2.3.1 to 2.3.3

build(deps): bump ossf/scorecard-action from 2.3.1 to 2.3.3 #352

---
# Inspired by: https://github.com/github/super-linter/blob/main/.github/workflows/deploy-production.yml
name: Deploy Production
on:
push:
branches: [ main ]
env:
REGISTRY: ghcr.io
permissions:
contents: read
jobs:
build:
name: Deploy Docker Image - Development
runs-on: ubuntu-latest
permissions:
deployments: write
packages: write
strategy:
fail-fast: false
matrix:
images:
- container-image-id-prefix: ""
deployment-environment-identifier: Production
image-id: production
timeout-minutes: 60
steps:
- name: Repository checkout
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
with:
fetch-depth: 0
- name: Get current date
run: |
echo "Appending the build date contents to GITHUB_ENV..."
echo "BUILD_DATE=$(date -u +'%Y-%m-%dT%H:%M:%SZ')" >> "${GITHUB_ENV}"
- name: Setup BuildX
uses: docker/setup-buildx-action@d70bba72b1f3fd22344832f00baa16ece964efeb # v3.3.0
- name: Login to GitHub Container Registry
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
uses: docker/login-action@e92390c5fb421da1463c202d546fed0ec5c39f20 # v3.1.0
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.repository }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Start deployment
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
uses: bobheadxi/deployments@648679e8e4915b27893bd7dbc35cb504dc915bc8 # v1.5.0
id: deployment
with:
step: start
token: ${{ secrets.GITHUB_TOKEN }}
env: ${{ matrix.images.deployment-environment-identifier }}
- name: Build Docker image - ${{ matrix.images.image-id }}
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
uses: docker/build-push-action@2cdde995de11925a030ce8070c3d77a52ffcf1c0 # v5.3.0
with:
context: .
file: ./Dockerfile
build-args: |
BUILD_DATE=${{ env.BUILD_DATE }}
BUILD_REVISION=${{ github.sha }}
BUILD_VERSION=${{ github.sha }}
load: false
push: true
tags: |
${{env.REGISTRY }}/${{ github.repository }}:${{ matrix.images.container-image-id-prefix }}latest
- name: Update deployment status
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
uses: bobheadxi/deployments@648679e8e4915b27893bd7dbc35cb504dc915bc8 # v1.5.0
with:
step: finish
token: ${{ secrets.GITHUB_TOKEN }}
status: ${{ job.status }}
deployment_id: ${{ steps.deployment.outputs.deployment_id }}
env: ${{ steps.deployment.outputs.env }}
env_url: https://github.com/${{ github.repository }}