Add "Docker Image CI" GHA Workflow #1
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 Image CI | |
on: | |
push: | |
branches: [ "main" ] | |
jobs: | |
build-and-push: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: docker/login-action@v3 | |
with: | |
username: ${{ secrets.DOCKER_HUB_USERNAME }} | |
password: ${{ secrets.DOCKER_HUB_TOKEN }} | |
- name: Build the `owntube/peertube-runner:v521` Docker image | |
run: docker build . --file Dockerfile.bullseye --tag owntube/peertube-runner:v521 | |
- name: Test the `owntube/peertube-runner:v521` Docker image | |
run: docker run -it --rm --name v521-runner-help owntube/peertube-runner:v521 peertube-runner --help | |
- name: Push the `owntube/peertube-runner:v521` Docker image | |
run: docker push owntube/peertube-runner:v521 | |
- name: Build the `owntube/peertube-runner:v603` Docker image | |
run: docker build . --file Dockerfile.bookworm --tag owntube/peertube-runner:v603 | |
- name: Test the `owntube/peertube-runner:v603` Docker image | |
run: docker run -it --rm --name v603-runner-help owntube/peertube-runner:v603 peertube-runner --help | |
- name: Push the `owntube/peertube-runner:v603` Docker image | |
run: docker push owntube/peertube-runner:v603 | |
- name: Push the `owntube/peertube-runner:latest` Docker image | |
run: docker tag owntube/peertube-runner:v603 owntube/peertube-runner:latest && docker push owntube/peertube-runner:latest |