33 lines
1.1 KiB
YAML
33 lines
1.1 KiB
YAML
name: Release
|
|
on:
|
|
push:
|
|
tags:
|
|
- '*'
|
|
|
|
jobs:
|
|
build_push:
|
|
runs-on: ubuntu-latest
|
|
container: docker:latest
|
|
steps:
|
|
- name: Install dependencies # not present in `docker` container but needed for `checkout` action
|
|
run: apk add --no-cache git nodejs
|
|
- name: Check out repository
|
|
uses: actions/checkout@v3
|
|
- name: Docker login
|
|
uses: actions/docker-login@v2
|
|
with:
|
|
registry: ${{secrets.DOCKER_REGISTRY}}
|
|
username: ${{secrets.DOCKER_USERNAME}}
|
|
password: ${{secrets.DOCKER_PASSWORD}}
|
|
- name: Build and push
|
|
uses: actions/docker-build-push@v4
|
|
with:
|
|
push: true
|
|
tags: |
|
|
${{secrets.DOCKER_REGISTRY}}/${{github.repository}}:${{github.ref_name}}
|
|
${{secrets.DOCKER_REGISTRY}}/${{github.repository}}:latest
|
|
env:
|
|
ACTIONS_RUNTIME_TOKEN: '' #https://gitea.com/gitea/act_runner/issues/119#issuecomment-738294
|
|
- name: Inspect image
|
|
run: docker inspect ${{secrets.DOCKER_REGISTRY}}/${{github.repository}}:${{github.ref_name}}
|