Skip to content

Commit 9c04db2

Browse files
authored
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
1 parent 206b3f1 commit 9c04db2

File tree

2 files changed

+57
-0
lines changed

2 files changed

+57
-0
lines changed

.github/workflows/docker-publish.yml

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
name: docker
2+
3+
on:
4+
schedule:
5+
- cron: '19 17 * * *' # Nightly builds capture upstream updates to dependency images such as node.
6+
push:
7+
branches: [ master ]
8+
tags: [ '*.*.*' ]
9+
pull_request:
10+
branches: [ master ]
11+
12+
env:
13+
REGISTRY: docker.io
14+
IMAGE_NAME: parseplatform/parse-dashboard
15+
16+
17+
jobs:
18+
build:
19+
20+
runs-on: ubuntu-18.04
21+
permissions:
22+
contents: read
23+
packages: write
24+
25+
steps:
26+
- name: Checkout repository
27+
uses: actions/checkout@v2
28+
29+
- name: Set up QEMU
30+
id: qemu
31+
uses: docker/setup-qemu-action@v1
32+
33+
- name: Set up Docker Buildx
34+
uses: docker/setup-buildx-action@v1
35+
36+
- name: Log into Docker Hub
37+
if: github.event_name != 'pull_request'
38+
uses: docker/login-action@v1
39+
with:
40+
username: ${{ secrets.DOCKERHUB_USERNAME }}
41+
password: ${{ secrets.DOCKERHUB_TOKEN }}
42+
43+
- name: Extract Docker metadata
44+
id: meta
45+
uses: docker/metadata-action@v3
46+
with:
47+
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
48+
49+
- name: Build and push Docker image
50+
uses: docker/build-push-action@v2
51+
with:
52+
context: .
53+
platforms: linux/amd64
54+
push: ${{ github.event_name != 'pull_request' }}
55+
tags: ${{ steps.meta.outputs.tags }}
56+
labels: ${{ steps.meta.outputs.labels }}

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55

66
## New Features
77
## Improvements
8+
- CI now pushes docker images to Docker Hub (Corey Baker) [#1781](https://github.com/parse-community/parse-dashboard/pull/1781)
89
- Add CI check to add changelog entry (Manuel Trezza) [#1764](https://github.com/parse-community/parse-dashboard/pull/1764)
910
- Refactor: uniform issue templates across repos (Manuel Trezza) [#1767](https://github.com/parse-community/parse-dashboard/pull/1767)
1011
- fix: date cell value not selected on double clicks (fn-faisal) [#1730](https://github.com/parse-community/parse-dashboard/pull/1730)

0 commit comments

Comments
 (0)