chore(deps): update docker (patch) #449
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: 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@v3 | |
- name: Login to GHCR | |
uses: docker/login-action@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@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 }} |