docker-arch/.github/workflows/docker-publish.yml

57 lines
1.4 KiB
YAML
Raw Normal View History

2021-10-09 12:16:01 +00:00
name: Docker
on:
schedule:
- cron: '0 0 * * *'
2021-10-19 16:47:07 +00:00
2021-10-09 12:16:01 +00:00
push:
branches:
2021-10-19 16:47:07 +00:00
- main
2021-10-09 12:16:01 +00:00
pull_request:
2022-12-25 19:39:58 +00:00
workflow_dispatch:
2021-10-09 12:16:01 +00:00
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Login to DockerHub
if: github.event_name != 'pull_request'
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
2022-02-16 13:52:47 +00:00
- name: Login to GitHub Container Registry
if: github.event_name != 'pull_request'
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
2022-02-16 14:00:18 +00:00
- name: Build and push Docker image (base)
2021-10-09 12:16:01 +00:00
uses: docker/build-push-action@v2
with:
2022-02-16 13:16:50 +00:00
context: ./base
2021-10-09 12:16:01 +00:00
push: ${{ github.event_name != 'pull_request' }}
2022-02-16 13:52:47 +00:00
tags: |
medzik/archlinux:latest
medzik/archlinux:base
2023-02-23 19:58:40 +00:00
ghcr.io/m3dzik/archlinux:latest
ghcr.io/m3dzik/archlinux:base
2022-02-16 14:00:18 +00:00
- name: Build and push Docker image (base-devel)
uses: docker/build-push-action@v2
with:
context: ./base-devel
push: ${{ github.event_name != 'pull_request' }}
tags: |
medzik/archlinux:base-devel
2023-02-23 19:58:40 +00:00
ghcr.io/m3dzik/archlinux:base-devel