Skip to content

Update build.yml

Update build.yml #3

Workflow file for this run

name: Build CMT Geth
on:
workflow_dispatch:
push:
branches:
- "master"
tags:
- 'v*'
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Check out the repo
uses: actions/checkout@v3
- name: Login to GitHub Container Registry
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Get latest tag
uses: 'WyriHaximus/github-action-get-previous-tag@v1'
id: get-latest-tag
with:
fallback: latest
- name: Build the Docker Image
run: |
docker build . --tag ghcr.io/cybermiles/travis-x:${{ steps.get-latest-tag.outputs.tag }}
docker push ghcr.io/cybermiles/travis-x:${{ steps.get-latest-tag.outputs.tag }}