Workflow file for this run
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: Build & Push Docker image for project | ||
on: | ||
push: | ||
types: [labeled] | ||
pull_request: | ||
types: [labeled] | ||
jobs: | ||
build-and-push: | ||
runs-on: ubuntu-latest | ||
if: ${{ (github.event_name == 'pull_request' && github.event.label.name == 'CI:Build') }} | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Login to Github Container repository | ||
- uses: docker/[email protected] | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Build the Docker image | ||
run: docker build . --file Dockerfile --tag go-etherium-devops:$(date +%s) | ||
- name: Push Docker image to Github container repository | ||
run: docker push ghcr.io/go-etherium-devops:$(date +%s) |