Skip to content

Commit

Permalink
Update build-nightly.yml
Browse files Browse the repository at this point in the history
Update to streamlined process
  • Loading branch information
InsertDisc authored Jan 10, 2024
1 parent 257d12e commit aeeb1f3
Showing 1 changed file with 31 additions and 6 deletions.
37 changes: 31 additions & 6 deletions .github/workflows/build-nightly.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
name: Build :nightly

on:
workflow_dispatch:
push:
Expand All @@ -13,20 +14,44 @@ on:
types: [closed]

jobs:
build:
build-and-push:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v3
with:
ref: nightly
ref: main

- name: Login to GitHub Container Registry
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin

- name: Build Docker image
run: docker build -t ghcr.io/insertdisc/pattrmm:nightly .
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}

- name: Set up QEMU
uses: docker/setup-qemu-action@master
with:
platforms: all

- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v3

- name: Push Docker image
run: docker push ghcr.io/insertdisc/pattrmm:nightly
- name: Build and push to GHCR and Docker Hub
id: docker_build_push_ghcr
uses: docker/build-push-action@v5
with:
context: ./
file: ./Dockerfile
platforms: linux/amd64,linux/arm64,linux/arm/v7
push: true
tags: |
ghcr.io/insertdisc/pattrmm:nightly
${{ secrets.DOCKER_HUB_USERNAME }}/pattrmm:nightly
cache-from: type=gha
cache-to: type=gha,mode=max

0 comments on commit aeeb1f3

Please sign in to comment.