deploy #108
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: deploy | |
on: | |
schedule: | |
- cron: "0 0 * * *" | |
workflow_dispatch: | |
env: | |
PROJECT_ID: twingate-labs | |
REGION: europe-west2 | |
GAR_LOCATION: europe-west2-docker.pkg.dev/twingate-labs/tg-agentless-images/ | |
jobs: | |
build_release: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
include: | |
- dockerfile: ./dockerfile-kasm-chrome | |
image: europe-west2-docker.pkg.dev/twingate-labs/tg-agentless-images/tg-chrome | |
- dockerfile: ./dockerfile-kasm-ubuntu-jammy-desktop | |
image: europe-west2-docker.pkg.dev/twingate-labs/tg-agentless-images/tg-desktop | |
- dockerfile: ./dockerfile-kasm-ubuntu-jammy-desktop-javaapp | |
image: europe-west2-docker.pkg.dev/twingate-labs/tg-agentless-images/tg-desktop-javaapp | |
steps: | |
- name: "Checkout" | |
uses: "actions/checkout@v3" | |
- id: "auth" | |
uses: "google-github-actions/auth@v1" | |
with: | |
credentials_json: ${{ secrets.SERVICE_ACCOUNT_KEY }} | |
- name: "Set up Cloud SDK" | |
uses: "google-github-actions/setup-gcloud@v1" | |
- name: "Use gcloud CLI" | |
run: "gcloud info" | |
- name: "Docker auth" | |
run: |- | |
gcloud auth configure-docker ${{ env.REGION }}-docker.pkg.dev --quiet | |
- name: Put current date into a variable | |
run: | | |
echo "NOW=$NOW" >> $env:GITHUB_ENV | |
- name: Build image | |
run: | | |
NOW=$(date "+%Y%m%d") | |
docker build . --file ${{ matrix.dockerfile }} --tag ${{ matrix.image }}:dev --tag ${{ matrix.image }}:latest --tag ${{ matrix.image }}:$NOW | |
# - name: Build image | |
# run: | | |
# docker image ls | |
# echo ${{ matrix.image }} | |
- name: Push image | |
run: docker push ${{ matrix.image }} --all-tags |