From c6a9034be1b537de2d9e3ff4291f116cac238299 Mon Sep 17 00:00:00 2001 From: Jan Koppe Date: Sat, 30 Oct 2021 09:20:03 +0200 Subject: [PATCH] add ghcr action --- .github/workflows/build-and-publish.yml | 31 +++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 .github/workflows/build-and-publish.yml diff --git a/.github/workflows/build-and-publish.yml b/.github/workflows/build-and-publish.yml new file mode 100644 index 0000000..9283eaa --- /dev/null +++ b/.github/workflows/build-and-publish.yml @@ -0,0 +1,31 @@ +name: Build and Publish + +on: + push: + branches: + - 'main' + pull_request: + +jobs: + docker: + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v2 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v1 + + - name: Login to Github Packages + uses: docker/login-action@v1 + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Build and push + id: docker_build + uses: docker/build-push-action@v2 + with: + push: ${{ github.ref == 'refs/heads/main' }} + tags: ghcr.io/chaoswest-tv/concierge:latest \ No newline at end of file