diff --git a/.dockerignore b/.dockerignore deleted file mode 100644 index 7ac4597..0000000 --- a/.dockerignore +++ /dev/null @@ -1,9 +0,0 @@ -*.md -Dockerfile -.dockerignore -*/temp* -*/*/temp* -temp? -*/.git* -*/*/.git* -.git? \ No newline at end of file diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..311d113 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,8 @@ +version: 2 +updates: + + # Maintain dependencies for GitHub Actions + - package-ecosystem: "github-actions" + directory: "/" + schedule: + interval: "daily" \ No newline at end of file diff --git a/.github/workflows/publish-docker-image-on-release.yml b/.github/workflows/publish-docker-image-on-release.yml deleted file mode 100644 index f8f25af..0000000 --- a/.github/workflows/publish-docker-image-on-release.yml +++ /dev/null @@ -1,31 +0,0 @@ -name: Publish Docker Image On Release - -on: - push: - tags: - - 'v*' - -jobs: - docker: - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v2 - - name: Docker meta - id: meta - uses: docker/metadata-action@v3 - with: - images: nevermendel/docker-xelatex-awesome-cv - - name: Login to DockerHub - if: github.event_name != 'pull_request' - uses: docker/login-action@v1 - with: - username: ${{ secrets.DOCKERHUB_USERNAME }} - password: ${{ secrets.DOCKERHUB_TOKEN }} - - name: Build and push - uses: docker/build-push-action@v2 - with: - context: . - push: true - tags: ${{ steps.meta.outputs.tags }} - labels: ${{ steps.meta.outputs.labels }} \ No newline at end of file diff --git a/.github/workflows/publish-docker-image.yml b/.github/workflows/publish-docker-image.yml index 4e371d4..f59f7b3 100644 --- a/.github/workflows/publish-docker-image.yml +++ b/.github/workflows/publish-docker-image.yml @@ -3,26 +3,48 @@ name: Publish Docker Image on: push: branches: - - 'master' - pull_request: - branches: - - 'master' + - 'latest' + - 'develop' + tags: + - 'v*' jobs: - docker: + publish-image: runs-on: ubuntu-latest steps: - name: Checkout 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 }} - - name: Build and push + + - name: Log in GitHub Docker registry + uses: docker/login-action@v1 + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Extract metadata (tags, labels) for Docker + id: meta + uses: docker/metadata-action@v3 + with: + images: | + nevermendel/docker-xelatex-awesome-cv + ghcr.io/${{ github.repository }} + tags: | + type=ref,event=branch + type=ref,event=pr + type=semver,pattern={{version}} + type=semver,pattern={{major}}.{{minor}} + + - name: Build and push Docker images uses: docker/build-push-action@v2 with: context: . - push: ${{ github.event_name != 'pull_request' }} - tags: nevermendel/docker-xelatex-awesome-cv:latest \ No newline at end of file + push: true + tags: ${{ steps.meta.outputs.tags }} + labels: ${{ steps.meta.outputs.labels }} diff --git a/.github/workflows/test-docker-image.yml b/.github/workflows/test-docker-image.yml new file mode 100644 index 0000000..ca545bf --- /dev/null +++ b/.github/workflows/test-docker-image.yml @@ -0,0 +1,22 @@ +name: Test Build Docker Image + +on: + push: + branches: + - '*' + pull_request: + branches: + - '*' + +jobs: + test-image: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v2 + + - name: Build Docker image + uses: docker/build-push-action@v2 + with: + context: . + push: false