mirror of
https://github.com/louislam/uptime-kuma.git
synced 2025-04-20 15:46:02 -04:00
Create dockerpush.yml
This commit is contained in:
parent
f48f957ba9
commit
9683e3bfd6
36
.github/workflows/dockerpush.yml
vendored
Normal file
36
.github/workflows/dockerpush.yml
vendored
Normal file
@ -0,0 +1,36 @@
|
||||
name: Container build & push
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- v*
|
||||
jobs:
|
||||
docker_build:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Get the tag
|
||||
run: |
|
||||
echo "TAG=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
|
||||
- name: Check out code
|
||||
uses: actions/checkout@v2
|
||||
- name: Login to DockerHub
|
||||
uses: docker/login-action@v1
|
||||
with:
|
||||
username: ${{ secrets.DOCKER_USERNAME }}
|
||||
password: ${{ secrets.DOCKER_TOKEN }}
|
||||
- name: Login to GitHub Container Registry
|
||||
uses: docker/login-action@v1
|
||||
with:
|
||||
registry: ghcr.io
|
||||
username: ${{ github.repository_owner }}
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
- name: Build and push
|
||||
uses: docker/build-push-action@v2
|
||||
with:
|
||||
context: .
|
||||
platforms: linux/amd64
|
||||
push: true
|
||||
tags: |
|
||||
${{ github.repository }}:latest
|
||||
${{ github.repository }}:${{ env.TAG }}
|
||||
ghcr.io/${{ github.repository }}:latest
|
||||
ghcr.io/${{ github.repository }}:${{ env.TAG }}
|
Loading…
x
Reference in New Issue
Block a user