Skip to content

chore(deps): update docker (minor) #502

chore(deps): update docker (minor)

chore(deps): update docker (minor) #502

Workflow file for this run

name: Continuous Integration
on:
push:
branches:
- main
tags:
- v*
pull_request:
branches:
- main
env:
GO_VERSION: "1.20"
jobs:
build-and-push:
name: Build & Push
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@c47758b77c9736f4b2ef4073d4d51994fabfe349 # v3
- name: Login to GHCR
uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 # v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Get Build timestamp and branch name
run: |
echo "BUILD_TIMESTAMP=$(date +'%s')" >> $GITHUB_ENV
echo "VERSION=$( echo ${{ github.head_ref || github.ref_name }} | tr '/' '-' )" >> $GITHUB_ENV
- name: Build and push
uses: docker/build-push-action@ca052bb54ab0790a636c9b5f226502c73d547a25 # v5
with:
push: true
build-args: |
VERSION=${{ env.VERSION }}
BUILD_TIMESTAMP=${{ env.BUILD_TIMESTAMP }}
COMMIT_HASH=${{ github.sha }}
tags: |
ghcr.io/${{ github.repository }}:${{ env.VERSION }}
ghcr.io/${{ github.repository }}:${{ github.sha }}