updated at 2024-01-29T09:17:07-05:00 #130
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Push candidate Docker image | |
on: | |
push: | |
branches: [ incoming ] | |
workflow_dispatch: | |
jobs: | |
push_to_registry: | |
name: Push latest Docker image to Docker Hub | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: [2.7] | |
node-version: [14.x] | |
steps: | |
- name: Check out the repo | |
uses: actions/checkout@v2 | |
with: | |
ref: incoming | |
submodules: true | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v1 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v1 | |
- name: Prepare image but do not push it yet | |
uses: docker/build-push-action@v3 | |
with: | |
context: ./core | |
file: ./core/Dockerfile | |
build-contexts: ext=ext | |
load: true | |
tags: ${{ github.repository_owner }}/grist-ee:candidate | |
cache-from: type=gha | |
- name: Log in to Docker Hub | |
uses: docker/login-action@v1 | |
with: | |
username: ${{ secrets.DOCKER_USERNAME }} | |
password: ${{ secrets.DOCKER_PASSWORD }} | |
- name: Push to Docker Hub | |
uses: docker/build-push-action@v2 | |
with: | |
context: ./core | |
file: ./core/Dockerfile | |
build-contexts: ext=ext | |
platforms: linux/amd64,linux/arm64/v8 | |
push: true | |
tags: ${{ github.repository_owner }}/grist-ee:candidate | |
cache-from: type=gha | |
cache-to: type=gha,mode=max | |
- name: Update candidate branch | |
uses: ad-m/github-push-action@8407731efefc0d8f72af254c74276b7a90be36e1 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
branch: candidate | |
force: true |