diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 0000000..eb00621 --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,19 @@ +name: 'publish' + +on: + push: + tags: + - v* + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: build + run: | + echo "${{ secrets.GHCR_TOKEN }}" | docker login ghcr.io -u "${{ secrets.GHCR_USER }}" --password-stdin + docker build . --tag ghcr.io/${{ github.repository }}:${GITHUB_REF#refs/tags/} + docker tag ghcr.io/${{ github.repository }}:${GITHUB_REF#refs/tags/} ghcr.io/${{ github.repository }}:latest + docker push ghcr.io/${{ github.repository }}:${GITHUB_REF#refs/tags/} + docker push ghcr.io/${{ github.repository }}:latest \ No newline at end of file