mirror of
https://github.com/snltty/linker.git
synced 2025-12-19 09:56:46 +08:00
53 lines
1.1 KiB
YAML
53 lines
1.1 KiB
YAML
name: Docker
|
|
|
|
on:
|
|
push:
|
|
branches: [ "master" ]
|
|
pull_request:
|
|
branches: [ "master" ]
|
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
|
|
- name: setup node.js
|
|
uses: actions/setup-node@v2
|
|
with:
|
|
node-version: '16'
|
|
|
|
- name: setup dotnet7
|
|
uses: actions/setup-dotnet@v2
|
|
env:
|
|
GITHUB_TOKEN: '${{ secrets.ACTIONS_TOKEN }}'
|
|
with:
|
|
dotnet-version: 7.0.x
|
|
|
|
- name: setup dotnet8
|
|
uses: actions/setup-dotnet@v2
|
|
env:
|
|
GITHUB_TOKEN: '${{ secrets.ACTIONS_TOKEN }}'
|
|
with:
|
|
dotnet-version: 8.0.x
|
|
|
|
- name: restore projects
|
|
run:
|
|
dotnet restore ./linker
|
|
|
|
- name: docker login
|
|
uses: docker/login-action@v2.1.0
|
|
with:
|
|
username: '${{secrets.DOCKER_USERNAME}}'
|
|
password: '${{secrets.DOCKER_PASSWORD}}'
|
|
|
|
- name: docker buildx
|
|
uses: docker/setup-buildx-action@v2.5.0
|
|
|
|
- name: chmod shell
|
|
run: chmod +x publish-docker.sh
|
|
- name: publish projects
|
|
run: ./publish-docker.sh |