Split buildx action into main and dev builds
Since Docker Hub no longer allows automated builds for free tier users, the build process for new images needs to be moved to GitHub Actions. The existing buildx workflow has worked pretty well for the most part, but was only enabled for the develop branch and only pushed the buildx-experimental tag. This addition allows pushes to the main branch to build updates for the "latest" tag as well, which is more commonly used I think.main
parent
4f5ed37c0a
commit
b44762d157
|
@ -0,0 +1,28 @@
|
|||
name: buildx
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: main
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: checkout code
|
||||
uses: actions/checkout@v2
|
||||
- name: install buildx
|
||||
id: buildx
|
||||
uses: crazy-max/ghaction-docker-buildx@v1
|
||||
with:
|
||||
version: latest
|
||||
- name: log in to docker hub
|
||||
run: |
|
||||
echo "${{ secrets.DOCKER_PASSWORD }}" | \
|
||||
docker login -u "${{ secrets.DOCKER_USERNAME }}" --password-stdin
|
||||
- name: build and push the image
|
||||
run: |
|
||||
docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
|
||||
docker buildx ls
|
||||
docker buildx build --push \
|
||||
--tag benbusby/whoogle-search:latest \
|
||||
--platform linux/amd64,linux/arm/v7,linux/arm64 .
|
Loading…
Reference in New Issue