Skip to content

Build container image #25

Build container image

Build container image #25

Workflow file for this run

name: Build container image
on:
release:
types: published
branches:
- main
permissions:
contents: read
packages: write
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/[email protected]
- name: Set up QEMU
uses: docker/[email protected]
- name: Set up Docker Buildx
uses: docker/[email protected]
- name: Login to GitHub Container Registry
uses: docker/[email protected]
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Log in to docker hub
uses: docker/[email protected]
with:
username: ${{ secrets.DOCKER_USER }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Build and push
uses: docker/[email protected]
with:
context: .
file: ./Dockerfile
platforms: linux/amd64,linux/arm64,linux/arm/v7
cache-from: type=gha
cache-to: type=gha,mode=max
push: true
tags: |
ghcr.io/${{ github.repository_owner }}/${{ github.repository }}:latest
ghcr.io/${{ github.repository_owner }}/${{ github.repository }}:${{ github.sha }}
docker.io/iainbullock/tesla_http_proxy:latest
docker.io/iainbullock/tesla_http_proxy:${{ github.ref_name }}