-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: Fix docker image pushing to Docker Hub (#1781)
* Create docker-publish.yml * update * update * Update CHANGELOG.md * change linux version * update access token * add correct tags * add latest tag * switch image_name * Update CHANGELOG.md * nit * add multi-platform * reduce platforms * remove arm7 * remove arm64 * only build on Intel * Nit * Update docker-publish.yml * allow latest tag to be set automatically
- Loading branch information
Showing
2 changed files
with
57 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
name: docker | ||
|
||
on: | ||
schedule: | ||
- cron: '19 17 * * *' # Nightly builds capture upstream updates to dependency images such as node. | ||
push: | ||
branches: [ master ] | ||
tags: [ '*.*.*' ] | ||
pull_request: | ||
branches: [ master ] | ||
|
||
env: | ||
REGISTRY: docker.io | ||
IMAGE_NAME: parseplatform/parse-dashboard | ||
|
||
|
||
jobs: | ||
build: | ||
|
||
runs-on: ubuntu-18.04 | ||
permissions: | ||
contents: read | ||
packages: write | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v2 | ||
|
||
- name: Set up QEMU | ||
id: qemu | ||
uses: docker/setup-qemu-action@v1 | ||
|
||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v1 | ||
|
||
- name: Log into Docker Hub | ||
if: github.event_name != 'pull_request' | ||
uses: docker/login-action@v1 | ||
with: | ||
username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.DOCKERHUB_TOKEN }} | ||
|
||
- name: Extract Docker metadata | ||
id: meta | ||
uses: docker/metadata-action@v3 | ||
with: | ||
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} | ||
|
||
- name: Build and push Docker image | ||
uses: docker/build-push-action@v2 | ||
with: | ||
context: . | ||
platforms: linux/amd64 | ||
push: ${{ github.event_name != 'pull_request' }} | ||
tags: ${{ steps.meta.outputs.tags }} | ||
labels: ${{ steps.meta.outputs.labels }} |
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