Skip to content

Update Dockerfile

Update Dockerfile #26

Workflow file for this run

name: release
on:
push:
branches:
- main
tags:
- '*'
pull_request:
branches:
- main
workflow_dispatch:
jobs:
build:
name: Build
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
strategy:
matrix:
image:
- alpine
- android-armv7
- android-arm64
- centos7-devtoolset7
- linux-x86
- linux-armv6
- linux-armv7
- linux-arm64
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Login
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build
if: startsWith(github.ref, 'refs/tags/') != true
uses: docker/build-push-action@v2
with:
context: ${{ matrix.image }}
push: false
- name: Build and push
if: startsWith(github.ref, 'refs/tags/')
uses: docker/build-push-action@v2
with:
context: ${{ matrix.image }}
tags: |
ghcr.io/node-usb/${{ matrix.image }}:latest
labels: |
org.opencontainers.image.version=1.0.0
org.opencontainers.image.source=${{ github.event.repository.html_url }}
org.opencontainers.image.revision=${{ github.sha }}
org.opencontainers.image.licenses=GPL-3.0-only
push: true