Skip to content

combined workflows

combined workflows #2

Workflow file for this run

name: Publish Docker image to GitHub Packages
on:
push:
branches:
- main
jobs:
build-and-push:
name: Build Docker image
runs-on: ubuntu-latest
steps:
- name: Check out the repo
uses: actions/checkout@v2
- name: setup Go
uses: actions/setup-go@v2
with:
go-version: 1.21
- name: Run mapping generator
run: cd mappinggenerator && go run main.go
- name: Build config generator
run: go build -o docker-build/ocbconfigbuilder src/*.go
- name: Build Docker image
run: docker build -f docker-build/Dockerfile --tag ghcr.io/${{ github.repository }}:latest docker-build/
- name: Log in to GitHub Docker Registry
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push Docker image
uses: docker/build-push-action@v2
with:
context: .
push: true
tags: ghcr.io/${{ github.repository }}:latest