-
Notifications
You must be signed in to change notification settings - Fork 3
41 lines (36 loc) · 1.18 KB
/
main.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
36
37
38
39
40
41
name: Publish
on:
push:
tags:
- '*'
jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
# Setup .npmrc file to publish to npm
- uses: actions/setup-node@v3
with:
node-version: 20
registry-url: 'https://registry.npmjs.org/'
- name: Install dependencies
run: yarn install
- name: Publish package
run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
build:
runs-on: ubuntu-latest
name: Build Docker Image
needs: publish
steps:
- uses: actions/checkout@v3
- name: Get version
id: get_version
run: echo "::set-output name=tag::$(echo "${{ github.REF }}" | sed -e 's|^refs/tags/||')"
- name: Login Docker
run: docker login --username hestudio --password ${{ secrets.DOCKER_PASSWORD }}
- run: docker build . --file Dockerfile --tag hestudio/bingwallpaper_get:${{ steps.get_version.outputs.tag }}
- run: docker build . --file Dockerfile --tag hestudio/bingwallpaper_get
- run: docker push hestudio/bingwallpaper_get:${{ steps.get_version.outputs.tag }}
- run: docker push hestudio/bingwallpaper_get