mirror of
https://github.com/danbulant/ctf-tcp-server
synced 2026-05-19 04:08:42 +00:00
22 lines
781 B
YAML
22 lines
781 B
YAML
name: Docker Image CI
|
|
|
|
on:
|
|
push:
|
|
branches: [ "master" ]
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
- name: Login to GitHub Container Registry
|
|
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin
|
|
- name: Build the Docker image
|
|
run: docker build . --file Dockerfile --tag ghcr.io/danbulant/tcp-spawner:latest
|
|
- name: Tag the docker image (date)
|
|
run: docker tag ghcr.io/danbulant/tcp-spawner:latest ghcr.io/danbulant/tcp-spawner:$(date --iso-8601)
|
|
- name: Publish the Docker image
|
|
run: docker push ghcr.io/danbulant/tcp-spawner:$(date --iso-8601)
|
|
- name: Publish the Docker image
|
|
run: docker push ghcr.io/danbulant/tcp-spawner:latest
|