-
Notifications
You must be signed in to change notification settings - Fork 6
35 lines (31 loc) · 1.14 KB
/
publish-docker-image.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
name: Publish Docker Image
on:
push:
branches:
- "main"
pull_request:
branches:
- "main"
jobs:
docker:
runs-on: ubuntu-latest
permissions:
packages: write
contents: read
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Write Git Info to Code
run: |
echo "export const GIT_COMMIT = \"$(git rev-parse --short HEAD)\", GIT_BRANCH = \"$(git branch --show-current)\";" > express/backend/src/version.ts
echo "export const GIT_COMMIT = \"$(git rev-parse --short HEAD)\", GIT_BRANCH = \"$(git branch --show-current)\";" > express/frontend/src/version.ts
- name: Build and push
uses: docker/build-push-action@v1
with:
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
registry: docker.pkg.github.com
repository: iobroker/dev-portal/express
path: ./express
tag_with_ref: true
tag_with_sha: true