forked from thestr4ng3r/chiaki-docker-switch
-
Notifications
You must be signed in to change notification settings - Fork 1
30 lines (29 loc) · 974 Bytes
/
build-chiaki.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
name: Build and publish
on:
push:
tags:
- "*" # Running this workflow for any tag
jobs:
push-webserver-image:
runs-on: ubuntu-latest
defaults:
run:
working-directory: .
steps:
- name: 'Checkout GitHub Action'
uses: actions/checkout@main
- name: Get the version
id: get_version
run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\//}
- name: 'Login to GitHub Container Registry'
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{github.actor}}
password: ${{secrets.GITHUB_TOKEN}}
- name: 'Install podman'
run: sudo apt-get install -y podman
- name: 'Build chiaki-ng build image'
run: |
podman build "$@" --tag ghcr.io/xlanor/chiaki-build-switch:${{ steps.get_version.outputs.VERSION }}
podman push ghcr.io/xlanor/chiaki-build-switch:${{ steps.get_version.outputs.VERSION }}