SUSE Base Container Image 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: SUSE Base Container Image CI | |
# How to trigger this workflow | |
on: | |
push: | |
branches: [ master ] | |
paths: | |
- 'docker/suse/bci/Dockerfile' | |
pull_request: | |
branches: [ master ] | |
paths: | |
- 'docker/suse/bci/Dockerfile' | |
workflow_dispatch: | |
schedule: | |
- cron: '0 0 1 * *' | |
jobs: | |
push_to_registry: | |
name: Build and push SUSE BCI to Docker Hub | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out the repo | |
uses: actions/checkout@v2 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v1 | |
- name: Create and use a new builder | |
run: | | |
docker buildx create --name mybuilder --use | |
docker buildx inspect --bootstrap | |
- name: Log in to Docker Hub | |
uses: docker/login-action@v1 | |
with: | |
username: ${{ secrets.DOCKERHUB_USERNAME}} | |
password: ${{ secrets.DOCKERHUB_PASSWD}} | |
- name: Extract bci metadata (tags, labels) for Docker | |
id: meta | |
uses: docker/metadata-action@v3 | |
with: | |
images: os369510/suse-bci | |
- name: Build and push SUSE bci Docker image | |
uses: docker/build-push-action@v2 | |
with: | |
context: . | |
push: true | |
file: docker/suse/bci/Dockerfile | |
tags: os369510/suse-bci:latest | |
platforms: linux/amd64,linux/arm64 |