Skip to content

Update Dockerfile

Update Dockerfile #9

Workflow file for this run

name: Docker Image CI
on:
push:
tags:
- 'v*'
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2.5.0
id: buildx
- name: Login to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
- name: Checkout
uses: actions/checkout@v3
- name: Get the version
id: get_version
run: |
version=$(git describe --tags --abbrev=0)
echo $version
echo ${version:1}
echo "VERSION=$version" >> $GITHUB_OUTPUT
echo "VERSION-NO-V=${version:1}" >> $GITHUB_OUTPUT
shell: bash
- name: Build and push
id: docker_build
uses: docker/build-push-action@v4
with:
context: ./
file: Dockerfile
push: true
builder: ${{ steps.buildx.outputs.name }}
tags: |
${{ secrets.DOCKER_HUB_USERNAME }}/nym-client:latest
${{ secrets.DOCKER_HUB_USERNAME }}/nym-client:${{ steps.get_version.outputs.VERSION }}
# cache-from: type=registry,ref=${{ secrets.DOCKER_HUB_USERNAME }}/nym-client:buildcache
# cache-to: type=registry,ref=${{ secrets.DOCKER_HUB_USERNAME }}/nym-client:buildcache,mode=max
- name: Image digest
run: echo ${{ steps.docker_build.outputs.digest }}