2FAuth/.github/workflows/ci-docker-publish-dev.yml

88 lines
2.3 KiB
YAML
Raw Normal View History

2023-03-24 09:10:08 +01:00
name: ci-docker-publish-dev
on:
push:
branches:
- dev
paths:
2023-03-24 09:10:08 +01:00
- .github/workflows/ci-docker-publish-dev.yml
- app/**
- bootstrap/**
- config/**
- database/**
- docker/**
- public/**
- resources/**
- routes/**
- storage/**
- tests/**
- .dockerignore
- .env.travis
- artisan
- composer.json
2022-07-25 14:51:44 +02:00
- composer.lock
- Dockerfile
- phpunit.xml
pull_request:
branches:
- dev
paths:
2023-03-24 09:10:08 +01:00
- .github/workflows/ci-docker-publish-dev.yml
- app/**
- bootstrap/**
- config/**
- database/**
- docker/**
- public/**
- resources/**
- routes/**
- storage/**
- tests/**
- .dockerignore
- .env.travis
- artisan
- composer.json
2022-07-25 14:51:44 +02:00
- composer.lock
- Dockerfile
- phpunit.xml
jobs:
publish:
if: |
(github.event_name == 'push' && github.repository == 'Bubka/2FAuth') ||
(github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == 'Bubka/2FAuth' && github.actor != 'dependabot[bot]')
runs-on: ubuntu-latest
steps:
2024-06-26 14:52:54 +02:00
- uses: actions/checkout@v4
with:
ref: ${{github.event.pull_request.head.ref}}
repository: ${{github.event.pull_request.head.repo.full_name}}
2024-06-26 14:52:54 +02:00
- uses: docker/setup-qemu-action@v3
- uses: docker/setup-buildx-action@v3
2024-06-26 14:52:54 +02:00
- uses: docker/login-action@v3
with:
2024-09-27 00:17:27 +02:00
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Set variables
id: set_vars
env:
EVENT_NAME: ${{ github.event_name }}
run: |
2023-03-24 09:10:08 +01:00
echo "commit=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
echo "created=$(date -u +%Y-%m-%dT%H:%M:%SZ)" >> $GITHUB_OUTPUT
echo "platforms=linux/amd64,linux/386" >> $GITHUB_OUTPUT
- name: Build and push to docker Hub
2024-09-27 15:39:42 +02:00
uses: docker/build-push-action@v6
with:
platforms: ${{ steps.set_vars.outputs.platforms }}
build-args: |
CREATED=${{ steps.set_vars.outputs.created }}
COMMIT=${{ steps.set_vars.outputs.commit }}
2023-03-24 09:10:08 +01:00
VERSION=dev
tags: |
2023-03-24 09:10:08 +01:00
2fauth/2fauth:dev
push: true