Skip to content

rewrite GH actions

rewrite GH actions #3

name: Build docker images
on:
push:
branches: [ 'master' ]
pull_request:
branches: [ 'master' ]
schedule:
- cron: "0 0 * * 0"
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Checkout code from Git repository
uses: actions/checkout@v2
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v1
- name: Docker login to GitHub
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push the image
run: |
docker buildx build --platform=linux/arm64,linux/amd64,linux/arm64,linux/arm/v7 . --tag ghcr.io/raspap/raspap-docker:latest --tag ghcr.io/raspap/raspap-docker:${{ github.run_number }}
docker push ghcr.io/raspap/raspap-docker --all-tags