ci #13
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: ci | |
# Controls when the workflow will run | |
on: | |
# Build weekly | |
schedule: | |
- cron: '0 11 * * 0' | |
push: | |
branches: | |
- 'main' | |
pull_request: | |
branches: | |
- 'main' | |
# tags: | |
# - [0-9]+.[0-9]+.[0-9]+* | |
# # Allows you to run this workflow manually from the Actions tab | |
# workflow_dispatch: | |
# JOBS section | |
jobs: | |
# Common image section | |
build-bcc: | |
name: build-bcc | |
runs-on: ubuntu-latest | |
steps: | |
- | |
name: Ubuntu - Checkout | |
uses: actions/checkout@v3 | |
- | |
name: Ubuntu - Set up QEMU | |
uses: docker/setup-qemu-action@v2 | |
- | |
name: Ubuntu - Login to Docker Hub | |
if: github.event_name != 'pull_request' | |
uses: docker/login-action@v2 | |
with: | |
username: ${{ secrets.DOCKER_HUB_USERNAME }} | |
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }} | |
- | |
name: Ubuntu - Set up Docker Buildx | |
uses: docker/setup-buildx-action@v2 | |
- | |
name: Ubuntu - Build and push | |
uses: docker/build-push-action@v3 | |
with: | |
context: . | |
file: ./Dockerfile | |
push: ${{ github.event_name != 'pull_request' }} | |
tags: ${{ secrets.DOCKER_HUB_USERNAME }}/ubuntu-bcc:latest, ${{ secrets.DOCKER_HUB_USERNAME }}/ubuntu-bcc:1.0.0 | |
labels: "bcc" |