Skip to content

initial commit

initial commit #1

name: build image and push image to dockerhub & ghcr.io
on:
workflow_dispatch:
push:
branches:
- 'main'
jobs:
docker_ubuntu_2204:
runs-on: ubuntu-latest
steps:
-
name: Checkout
uses: actions/checkout@v4
-
name: Set up QEMU
uses: docker/setup-qemu-action@v3
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
-
name: Login to DockerHub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
-
name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GHCR_TOKEN }}
-
name: Build and push latest
uses: docker/[email protected]
with:
file: ubuntu/22.04.Dockerfile
context: .
platforms: linux/amd64,linux/arm64
push: true
tags: |
${{ github.repository_owner }}/erlang_elixir_vfox_ubuntu_container:latest
ghcr.io/${{ github.repository_owner }}/erlang_elixir_vfox_ubuntu_container:latest
cache-from: type=gha
cache-to: type=gha,mode=max