diff --git a/.github/workflows/default.yml b/.github/workflows/default.yml deleted file mode 100644 index c63c83b..0000000 --- a/.github/workflows/default.yml +++ /dev/null @@ -1,74 +0,0 @@ -name: docker-build - -on: - pull_request: - branches: - - main - push: - branches: - - main - tags: - - 'v*' - -jobs: - build: - runs-on: ubuntu-latest - permissions: - contents: read - packages: write - - steps: - - name: Checkout - uses: actions/checkout@v3 - - # https://docs.docker.com/build/ci/github-actions/multi-platform/ - - name: Set up QEMU - uses: docker/setup-qemu-action@v2 - - # Workaround: https://github.com/docker/build-push-action/issues/461 - - name: Setup Docker buildx - uses: docker/setup-buildx-action@v2 - - - name: Log in to the github container registry - uses: docker/login-action@v2 - with: - registry: ghcr.io - username: ${{ github.actor }} - password: ${{ secrets.GITHUB_TOKEN }} - - - # https://github.com/docker/login-action - - name: Login to DockerHub - uses: docker/login-action@v2 - with: - username: ${{ secrets.DOCKERHUB_USER }} - password: ${{ secrets.DOCKERHUB_TOKEN }} - - - name: Extract metadata (tags, labels) for Docker - id: meta - uses: docker/metadata-action@v4 - with: - - github-token: ${{ secrets.GITHUB_TOKEN }} - images: | - ghcr.io/${{ github.repository }} - terraformlabs/${{ github.event.repository.name }} - tags: | - type=sha - type=edge,branch=test - type=semver,pattern={{tag}} - type=semver,pattern={{version}} - type=raw,value=latest,event=branch,enable=${{ github.ref == format('refs/heads/{0}', 'main') }} - type=raw,value=classic,event=branch,enable=${{ github.ref == format('refs/heads/{0}', 'classic') }} - - - name: Build docker image - uses: docker/build-push-action@v3 - with: - push: ${{ github.event_name != 'pull_request' }} - file: Dockerfile - platforms: linux/amd64 - tags: ${{ env.DOCKER_METADATA_OUTPUT_TAGS }} - labels: ${{ env.DOCKER_METADATA_OUTPUT_LABELS }} - - - diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 22de273..e9ad951 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -1,15 +1,13 @@ -name: docker-build +name: Docker Build on: pull_request: branches: - main - - test - classic push: branches: - main - - test - classic tags: - 'v*' @@ -66,9 +64,9 @@ jobs: github-token: ${{ secrets.GITHUB_TOKEN }} images: | - ${{ steps.login-ecr.outputs.registry }}/fcd + ${{ steps.login-ecr.outputs.registry }}/${{ github.event.repository.name }} ghcr.io/${{ github.repository }} - terraformlabs/fcd + terraformlabs/${{ github.event.repository.name }} tags: | type=sha type=edge,branch=test