Skip to content

Commit

Permalink
add docker build workflow (#46)
Browse files Browse the repository at this point in the history
  • Loading branch information
Miłosz Skaza authored Dec 28, 2022
1 parent 29bce6a commit fc0350c
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Build Docker
on:
release:
types: [published]

jobs:
build-and-push-docker:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.CR_PAT }}
- name: Extract version
run: |
export VERSION=`node -e "console.log(require('./package').version)"`
echo "version=$VERSION" >> $GITHUB_OUTPUT
id: extract_version
- name: Build and push latest
uses: docker/build-push-action@v3
with:
push: true
tags: |
ghcr.io/ctfd/tourist:latest
ghcr.io/ctfd/tourist:${{ steps.extract_version.outputs.version }}

0 comments on commit fc0350c

Please sign in to comment.