Move 200 OK HEAD response to user folder #22
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Docker | |
on: | |
push: | |
# Publish `main` as Docker `latest` image. | |
branches: | |
- main | |
# Publish `v1.2.3` tags as releases. | |
tags: | |
- v* | |
# Run tests for any PRs. | |
pull_request: | |
env: | |
IMAGE_NAME: scan-server | |
jobs: | |
# Push image to GitHub Packages. | |
# See also https://docs.docker.com/docker-hub/builds/ | |
push: | |
runs-on: ubuntu-latest | |
if: github.event_name == 'push' | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Prepare | |
id: prep | |
run: | | |
DOCKER_IMAGE=ghcr.io/tilblechschmidt/scan-server | |
TAGS="${DOCKER_IMAGE}:sha-${GITHUB_SHA::7}" | |
echo "tags=${TAGS}" >> $GITHUB_ENV | |
echo "created=$(date -u +'%Y-%m-%dT%H:%M:%SZ')" >> $GITHUB_ENV | |
- name: Login to GHCR | |
uses: docker/login-action@v1 | |
with: | |
registry: ghcr.io | |
username: ${{ github.repository_owner }} | |
password: ${{ secrets.GHCR_TOKEN }} | |
- name: Install musl-tools | |
run: sudo apt-get install -y musl-tools | |
- name: Install latest nightly | |
uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: stable | |
target: x86_64-unknown-linux-musl | |
override: true | |
- name: Build binary | |
run: | | |
cargo build --target=x86_64-unknown-linux-musl --release | |
- name: Build and push scan-server Docker image | |
uses: docker/build-push-action@v2 | |
with: | |
context: . | |
tags: ${{ env.tags }} | |
push: true | |
labels: | | |
org.opencontainers.image.source=${{ github.event.repository.html_url }} | |
org.opencontainers.image.created=${{ env.created }} | |
org.opencontainers.image.revision=${{ github.sha }} |