From 891bf11e44cc318d50db774740d81fbc79995b3d Mon Sep 17 00:00:00 2001 From: Ross Fairbanks Date: Sun, 6 Mar 2022 13:12:27 +0100 Subject: [PATCH 1/2] feat: Add github action to tag docker image --- .github/workflows/docker-release.yml | 47 ++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 .github/workflows/docker-release.yml diff --git a/.github/workflows/docker-release.yml b/.github/workflows/docker-release.yml new file mode 100644 index 00000000..7dfbb332 --- /dev/null +++ b/.github/workflows/docker-release.yml @@ -0,0 +1,47 @@ +name: docker_release + +on: + push: + branches: [ dev ] + paths-ignore: + - 'docs_src/**' + - 'README.md' + - 'CHANGELOG.md' + - 'CITATION' + - 'book.toml' + - 'CONTRIBUTING.md' + tags: [ 'v*.*.*' ] + +jobs: + build_and_push: + name: build_and_push_docker_image + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v3 + - name: Docker metadata + id: meta + uses: docker/metadata-action@v3 + with: + images: | + hubblo/scaphandre + tags: | + type=ref,event=branch + type=semver,pattern={{version}} + - name: Set up QEMU + uses: docker/setup-qemu-action@v1 + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v1 + - name: Login to DockerHub + uses: docker/login-action@v1 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + - name: Build and push + id: docker_build + uses: docker/build-push-action@v2 + with: + context: . + push: true + tags: ${{ steps.meta.outputs.tags }} + labels: ${{ steps.meta.outputs.labels }} From c29bd649e2501f264356f97c9f0509fb497d5644 Mon Sep 17 00:00:00 2001 From: Ross Fairbanks Date: Sat, 12 Mar 2022 09:57:11 +0100 Subject: [PATCH 2/2] Add main branch to docker_release action --- .github/workflows/docker-release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/docker-release.yml b/.github/workflows/docker-release.yml index 7dfbb332..cd2e829f 100644 --- a/.github/workflows/docker-release.yml +++ b/.github/workflows/docker-release.yml @@ -2,7 +2,7 @@ name: docker_release on: push: - branches: [ dev ] + branches: [ main, dev ] paths-ignore: - 'docs_src/**' - 'README.md'