31 lines
921 B
YAML
31 lines
921 B
YAML
# A single-shot build-n-pack on Alpine Linux
|
|
name: Publish Docker image
|
|
on: [push]
|
|
|
|
jobs:
|
|
push_to_registry:
|
|
name: Build Docker image
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Check token is set
|
|
id: vars
|
|
shell: bash
|
|
run: |
|
|
unset HAS_SECRET
|
|
if [-n $SECRET]; then HAS_SECRET='true' ; fi
|
|
echo ::set-output name=HAS_SECRET_TOKEN::${HAS_SECRET}
|
|
env:
|
|
SECRET: "${{ secrets.DOCKER_TOKEN }}"
|
|
- name: Check out the repo
|
|
uses: actions/checkout@v2
|
|
if: ${{ steps.vars.outputs.HAS_SECRET }}
|
|
- name: Push to Docker Hub
|
|
uses: docker/build-push-action@v1
|
|
if: ${{ steps.vars.outputs.HAS_SECRET }}
|
|
with:
|
|
username: thirtythreeforty
|
|
password: ${{ secrets.DOCKER_TOKEN }}
|
|
registry: docker.io
|
|
repository: thirtythreeforty/neolink
|
|
tag_with_ref: true
|