mirror of
https://github.com/eliasstepanik/AutoProxy.git
synced 2026-01-10 05:08:33 +00:00
43 lines
1.2 KiB
YAML
43 lines
1.2 KiB
YAML
name: Docker Image CI
|
|
|
|
on:
|
|
push:
|
|
branches: [ "master"]
|
|
pull_request:
|
|
branches: [ "master"]
|
|
|
|
jobs:
|
|
|
|
build_n_push:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
- name: Extract branch name
|
|
shell: bash
|
|
run: echo "branch=$(echo ${GITHUB_REF#refs/heads/})" >>$GITHUB_OUTPUT
|
|
id: extract_branch
|
|
|
|
- name: Set up Docker Buildx
|
|
uses: docker/setup-buildx-action@v1
|
|
with:
|
|
install: true
|
|
|
|
- name: Docker Build and Tag Prod
|
|
run: docker build --load -t saile2204/ionos_ddns_updater:latest-${{ steps.extract_branch.outputs.branch }} -t saile2204/ionos_ddns_updater:${{ steps.extract_branch.outputs.branch }}-$GITHUB_SHA .
|
|
|
|
- name: Docker Build and Tagd
|
|
run: docker build --load -t saile2204/ionos_ddns_updater:$(date +%s) .
|
|
|
|
- name: Log in to Docker Hub
|
|
uses: docker/login-action@v1
|
|
with:
|
|
username: ${{ secrets.DOCKERUSERNAME }}
|
|
password: ${{ secrets.DOCKERPASSWORD }}
|
|
|
|
- name: Push to Dockerhub
|
|
run: |
|
|
docker push saile2204/ionos_ddns_updater:latest-${{ steps.extract_branch.outputs.branch }}
|
|
docker push saile2204/ionos_ddns_updater:${{ steps.extract_branch.outputs.branch }}-$GITHUB_SHA
|