mirror of
https://github.com/s83/docker-brudi-rclone.git
synced 2024-11-30 12:35:28 +00:00
Create main.yml
This commit is contained in:
parent
9cfdc01d47
commit
8ea29498dc
35
.github/workflows/main.yml
vendored
Normal file
35
.github/workflows/main.yml
vendored
Normal file
@ -0,0 +1,35 @@
|
||||
name: Build and Publish Docker Image
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
tags:
|
||||
- 'v*' # Trigger on tags that start with 'v'
|
||||
|
||||
jobs:
|
||||
build-and-publish:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v1
|
||||
|
||||
- name: Build Docker image
|
||||
run: |
|
||||
docker build -t sami/brudi-rclone:${{ github.ref }} .
|
||||
docker tag sami/brudi-rclone:${{ github.ref }} sami/brudi-rclone:latest
|
||||
|
||||
- name: Log in to Docker Hub
|
||||
uses: docker/login-action@v1
|
||||
with:
|
||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||
|
||||
- name: Push image to Docker Hub
|
||||
run: |
|
||||
docker push sami/brudi-rclone:${{ github.ref }}
|
||||
docker push sami/brudi-rclone:latest
|
Loading…
Reference in New Issue
Block a user