Skip to content

Update publish.yml

Update publish.yml #4

Workflow file for this run

name: publish
on:
push:
branches: [master, develop]
jobs:
publish-docker-image:
runs-on: ubuntu-latest
steps:
- name: Checkout the repository
uses: actions/checkout@v2
- name: Build and publish the Docker image
run: |
echo $GITHUB_TOKEN | docker login ghcr.io -u threatcode --password-stdin
docker build . --tag ghcr.io/threatcode/attack-workbench:$IMAGE_TAG
docker push ghcr.io/threatcode/attack-workbench:$IMAGE_TAG
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
IMAGE_TAG: "${{ github.ref == 'refs/head/master' && 'latest' || 'develop' }}"